p2p/simulations: Don't disconnect nodes before stopping

Signed-off-by: Lewis Marshall <lewis@lmars.net>
This commit is contained in:
Lewis Marshall 2017-06-18 12:14:34 +02:00
parent 5cfb34a151
commit f079529445

View file

@ -589,14 +589,6 @@ func (self *Network) getConn(oneID, otherID discover.NodeID) *Conn {
} }
func (self *Network) Shutdown() { func (self *Network) Shutdown() {
// disconnect all nodes
for _, conn := range self.Conns {
log.Debug(fmt.Sprintf("disconnecting %s from %s", conn.One.TerminalString(), conn.Other.TerminalString()))
if err := self.Disconnect(conn.One, conn.Other); err != nil {
log.Warn(fmt.Sprintf("error disconnecting %s from %s", conn.One.TerminalString(), conn.Other.TerminalString()), "err", err)
}
}
// stop all nodes // stop all nodes
for _, node := range self.Nodes { for _, node := range self.Nodes {
log.Debug(fmt.Sprintf("stopping node %s", node.ID().TerminalString())) log.Debug(fmt.Sprintf("stopping node %s", node.ID().TerminalString()))