p2p/discv5: unset pingEcho on pong timeout (#21324)

This commit is contained in:
libotony 2020-07-13 17:20:47 +08:00 committed by GitHub
parent af258efdb9
commit 2e08dad9e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1037,6 +1037,9 @@ func (net *Network) handle(n *Node, ev nodeEvent, pkt *ingressPacket) error {
net.db.ensureExpirer()
}
}
if ev == pongTimeout {
n.pingEcho = nil // clean up if pongtimeout
}
if n.state == nil {
n.state = unknown //???
}