plugeth/eth
Felix Lange 56ed6152a1 core, eth, miner: improve shutdown synchronisation
Shutting down geth prints hundreds of annoying error messages in some
cases. The errors appear because the Stop method of eth.ProtocolManager,
miner.Miner and core.TxPool is asynchronous. Left over peer sessions
generate events which are processed after Stop even though the database
has already been closed.

The fix is to make Stop synchronous using sync.WaitGroup.

For eth.ProtocolManager, in order to make use of WaitGroup safe, we need
a way to stop new peer sessions from being added while waiting on the
WaitGroup. The eth protocol Run function now selects on a signaling
channel and adds to the WaitGroup only if ProtocolManager is not
shutting down.

For miner.worker and core.TxPool the number of goroutines is static,
WaitGroup can be used in the usual way without additional
synchronisation.
2016-05-09 13:03:08 +02:00
..
downloader rpc: remove NotifierContextKey 2016-04-15 18:10:52 +02:00
fetcher eth: various typos 2016-03-15 11:27:49 -07:00
filters eth/filters: ignore logs that don't match filter criteria on chain reorg 2016-04-28 12:33:42 +02:00
api.go release, all: integrate the release service into geth 2016-05-02 16:20:21 +03:00
backend_test.go all: update license information 2016-04-15 09:48:05 +02:00
backend.go core, eth, miner: improve shutdown synchronisation 2016-05-09 13:03:08 +02:00
bind.go release, all: integrate the release service into geth 2016-05-02 16:20:21 +03:00
cpu_mining.go all: update license information 2016-04-15 09:48:05 +02:00
gasprice.go core, eth, rpc: split out block validator and state processor 2015-11-18 14:24:42 +01:00
gpu_mining.go all: update license information 2016-04-15 09:48:05 +02:00
handler_test.go all: fix go vet warnings 2016-04-15 11:17:27 +02:00
handler.go core, eth, miner: improve shutdown synchronisation 2016-05-09 13:03:08 +02:00
helper_test.go core, eth, miner: improve shutdown synchronisation 2016-05-09 13:03:08 +02:00
metrics.go eth: various typos 2016-03-15 11:27:49 -07:00
peer.go core, eth, miner: improve shutdown synchronisation 2016-05-09 13:03:08 +02:00
protocol_test.go all: fix go vet warnings 2016-04-15 11:17:27 +02:00
protocol.go eth, p2p, rpc/api: polish protocol info gathering 2015-10-28 12:44:15 +02:00
sync_test.go eth, p2p, rpc/api: polish protocol info gathering 2015-10-28 12:44:15 +02:00
sync.go core, eth, miner: improve shutdown synchronisation 2016-05-09 13:03:08 +02:00