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…
x
Reference in New Issue
Block a user