Merge pull request #309 from fireyang/master

fix rpc client call WARNING: DATA RACE
This commit is contained in:
Asim Aslam 2018-09-20 07:39:45 +01:00 committed by GitHub
commit 4cee1f19f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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