Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
swarm/network: fix data race in stream.(*Peer).handleOfferedHashesMsg…
…() (ethereum#18468) * swarm/network: fix data race in stream.(*Peer).handleOfferedHashesMsg() handleOfferedHashesMsg() contained a data race: - read => in a goroutine, call to c.batchDone() - write => in the main thread, write to c.sessionAt c.batchDone() contained a call to c.AddInterval(). Client was a value receiver for AddInterval. So on c.AddInterval() call the whole client struct got copied (read) while one of its field was modified in handleOfferedHashesMsg() (write). fixes ethersphere/swarm#1086 * swarm/network: simplify some trivial statements
- Loading branch information