1
0
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:
Asim 2015-10-22 10:33:33 +01:00
parent e2b849da29
commit b1b316df77

View File

@ -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)