Skip to content

Commit

Permalink
*really* fix the race in mock
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Oct 24, 2018
1 parent 8af9bc6 commit 80c5998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/net/mock/mock_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (s *stream) Write(p []byte) (n int, err error) {
select {
case <-s.closed: // bail out if we're closing.
return 0, s.writeErr
case s.toDeliver <- &transportObject{msg: p, arrivalTime: t}:
case s.toDeliver <- &transportObject{msg: cpy, arrivalTime: t}:
}
return len(p), nil
}
Expand Down

0 comments on commit 80c5998

Please sign in to comment.