Unverified Commit 91514ce0 authored by Steven Allen's avatar Steven Allen Committed by GitHub
Browse files

Merge pull request #465 from libp2p/fix/mock-race-really

*really* fix the race in mock
parents 8af9bc62 80c59982
......@@ -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
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment