Skip to content

Commit

Permalink
fix rpc client call WARNING: DATA RACE
Browse files Browse the repository at this point in the history
  • Loading branch information
fireyang committed Sep 20, 2018
1 parent 818f150 commit ef8b5e2
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 ef8b5e2

Please sign in to comment.