mirror of
https://github.com/go-micro/go-micro.git
synced 2024-11-24 08:02:32 +02:00
Fix connection leak
This commit is contained in:
parent
e2b849da29
commit
b1b316df77
@ -79,6 +79,7 @@ func (r *rpcClient) call(ctx context.Context, address string, request Request, r
|
||||
if err != nil {
|
||||
return errors.InternalServerError("go.micro.client", fmt.Sprintf("Error sending request: %v", err))
|
||||
}
|
||||
defer c.Close()
|
||||
|
||||
client := rpc.NewClientWithCodec(newRpcPlusCodec(msg, c))
|
||||
return client.Call(ctx, request.Method(), request.Request(), response)
|
||||
|
Loading…
Reference in New Issue
Block a user