mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-04 23:32:55 +00:00
eth: stop p2p.Server on shutdown
This commit is contained in:
parent
394826f520
commit
2f249fea44
1 changed files with 1 additions and 1 deletions
|
|
@ -535,6 +535,7 @@ func (self *Ethereum) AddPeer(nodeURL string) error {
|
||||||
func (s *Ethereum) Stop() {
|
func (s *Ethereum) Stop() {
|
||||||
s.txSub.Unsubscribe() // quits txBroadcastLoop
|
s.txSub.Unsubscribe() // quits txBroadcastLoop
|
||||||
|
|
||||||
|
s.net.Stop()
|
||||||
s.protocolManager.Stop()
|
s.protocolManager.Stop()
|
||||||
s.chainManager.Stop()
|
s.chainManager.Stop()
|
||||||
s.txPool.Stop()
|
s.txPool.Stop()
|
||||||
|
|
@ -544,7 +545,6 @@ func (s *Ethereum) Stop() {
|
||||||
}
|
}
|
||||||
s.StopAutoDAG()
|
s.StopAutoDAG()
|
||||||
|
|
||||||
glog.V(logger.Info).Infoln("Server stopped")
|
|
||||||
close(s.shutdownChan)
|
close(s.shutdownChan)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue