From ef8b5e28b0d32837974bc1204855de0b1fb5a0c3 Mon Sep 17 00:00:00 2001 From: fireyang Date: Thu, 20 Sep 2018 10:08:00 +0800 Subject: [PATCH] fix rpc client call WARNING: DATA RACE --- client/rpc_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/rpc_client.go b/client/rpc_client.go index 681e6298cd..d46fdcd719 100644 --- a/client/rpc_client.go +++ b/client/rpc_client.go @@ -89,7 +89,7 @@ func (r *rpcClient) call(ctx context.Context, address string, req Request, resp r.pool.release(address, c, grr) }() - seq := r.seq + seq := atomic.LoadUint64(&r.seq) atomic.AddUint64(&r.seq, 1) stream := &rpcStream{