mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
p2p/simulations: Don't disconnect nodes before stopping
Signed-off-by: Lewis Marshall <lewis@lmars.net>
This commit is contained in:
parent
5cfb34a151
commit
f079529445
1 changed files with 0 additions and 8 deletions
|
|
@ -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()))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue