Skip to content

Commit

Permalink
rpcserver: fix jsonRPCRead data race.
Browse files Browse the repository at this point in the history
  • Loading branch information
dnldd authored and davecgh committed Mar 24, 2018
1 parent ddae30b commit 0fc5525
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -6058,7 +6058,7 @@ func (s *rpcServer) jsonRPCRead(w http.ResponseWriter, r *http.Request, isAdmin
// the CloseNotifer on the ResponseWriter is not available.
closeChan := make(chan struct{}, 1)
go func() {
_, err = conn.Read(make([]byte, 1))
_, err := conn.Read(make([]byte, 1))
if err != nil {
close(closeChan)
}
Expand Down

0 comments on commit 0fc5525

Please sign in to comment.