forked from cerc-io/plugeth
* 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/go-ethereum#1086 * swarm/network: simplify some trivial statements |
||
|---|---|---|
| .. | ||
| intervals | ||
| testing | ||
| common_test.go | ||
| delivery_test.go | ||
| delivery.go | ||
| intervals_test.go | ||
| lightnode_test.go | ||
| messages.go | ||
| peer.go | ||
| snapshot_retrieval_test.go | ||
| snapshot_sync_test.go | ||
| stream.go | ||
| streamer_test.go | ||
| syncer_test.go | ||
| syncer.go | ||
| visualized_snapshot_sync_sim_test.go | ||