mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-04-13 13:18:35 +00:00
eth: stop eventMux first
This fixes the hang in Ethereum.Stop.
This commit is contained in:
parent
8170f96ded
commit
e252dbf989
1 changed files with 3 additions and 1 deletions
|
|
@ -490,6 +490,9 @@ func (s *Ethereum) peerHandler(listener net.Listener) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Ethereum) Stop() {
|
func (s *Ethereum) Stop() {
|
||||||
|
// Stop eventMux first, it will close all subscriptions.
|
||||||
|
s.eventMux.Stop()
|
||||||
|
|
||||||
// Close the database
|
// Close the database
|
||||||
defer s.db.Close()
|
defer s.db.Close()
|
||||||
|
|
||||||
|
|
@ -514,7 +517,6 @@ func (s *Ethereum) Stop() {
|
||||||
}
|
}
|
||||||
s.txPool.Stop()
|
s.txPool.Stop()
|
||||||
s.stateManager.Stop()
|
s.stateManager.Stop()
|
||||||
s.eventMux.Stop()
|
|
||||||
s.blockPool.Stop()
|
s.blockPool.Stop()
|
||||||
|
|
||||||
ethlogger.Infoln("Server stopped")
|
ethlogger.Infoln("Server stopped")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue