Shut down listeners when stopping

This commit is contained in:
Neil Alexander 2019-09-18 16:32:22 +01:00
parent b0df9e2f31
commit b959f53fee
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 16 additions and 0 deletions

View file

@ -194,7 +194,9 @@ func (c *Core) _stop() {
if c.addPeerTimer != nil {
c.addPeerTimer.Stop()
}
c.link.stop()
for _, peer := range c.GetPeers() {
c.DisconnectPeer(peer.Port)
}
c.log.Infoln("Stopped")
}