diff options
author | Felix Lange <fjl@twurst.com> | 2014-10-29 10:01:20 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2014-10-29 10:01:20 +0800 |
commit | e252dbf989f8a8e08e3edcaf075febee315e53fd (patch) | |
tree | 783fb8eddd5c167b8520bd5591b61432627081df /ethereum.go | |
parent | 8170f96dedb983c391d26378726d7fd6921ff959 (diff) | |
download | dexon-e252dbf989f8a8e08e3edcaf075febee315e53fd.tar dexon-e252dbf989f8a8e08e3edcaf075febee315e53fd.tar.gz dexon-e252dbf989f8a8e08e3edcaf075febee315e53fd.tar.bz2 dexon-e252dbf989f8a8e08e3edcaf075febee315e53fd.tar.lz dexon-e252dbf989f8a8e08e3edcaf075febee315e53fd.tar.xz dexon-e252dbf989f8a8e08e3edcaf075febee315e53fd.tar.zst dexon-e252dbf989f8a8e08e3edcaf075febee315e53fd.zip |
eth: stop eventMux first
This fixes the hang in Ethereum.Stop.
Diffstat (limited to 'ethereum.go')
-rw-r--r-- | ethereum.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ethereum.go b/ethereum.go index c2d209597..a389c663d 100644 --- a/ethereum.go +++ b/ethereum.go @@ -490,6 +490,9 @@ func (s *Ethereum) peerHandler(listener net.Listener) { } func (s *Ethereum) Stop() { + // Stop eventMux first, it will close all subscriptions. + s.eventMux.Stop() + // Close the database defer s.db.Close() @@ -514,7 +517,6 @@ func (s *Ethereum) Stop() { } s.txPool.Stop() s.stateManager.Stop() - s.eventMux.Stop() s.blockPool.Stop() ethlogger.Infoln("Server stopped") |