Skip to content

Commit

Permalink
Merge pull request #309 from fireyang/master
Browse files Browse the repository at this point in the history
fix rpc client call WARNING: DATA RACE
  • Loading branch information
Asim Aslam authored Sep 20, 2018
2 parents 818f150 + ef8b5e2 commit 4cee1f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 4cee1f1

Please sign in to comment.