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)