Merge pull request #2833 from karalabe/fix-dao-challenge-annoyance

eth: cancel DAO challenge on peer drop (annoying log)
This commit is contained in:
Péter Szilágyi 2016-07-22 11:57:43 +03:00 committed by GitHub
commit c646d287f8

View File

@ -295,6 +295,13 @@ func (pm *ProtocolManager) handle(p *peer) error {
glog.V(logger.Warn).Infof("%v: timed out DAO fork-check, dropping", p)
pm.removePeer(p.id)
})
// Make sure it's cleaned up if the peer dies off
defer func() {
if p.forkDrop != nil {
p.forkDrop.Stop()
p.forkDrop = nil
}
}()
}
// main loop. handle incoming messages.
for {