Skip to content

Commit c646d28

Browse files
authored
Merge pull request #2833 from karalabe/fix-dao-challenge-annoyance
eth: cancel DAO challenge on peer drop (annoying log)
2 parents f273c64 + 91f18ff commit c646d28

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

eth/handler.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,13 @@ func (pm *ProtocolManager) handle(p *peer) error {
295295
glog.V(logger.Warn).Infof("%v: timed out DAO fork-check, dropping", p)
296296
pm.removePeer(p.id)
297297
})
298+
// Make sure it's cleaned up if the peer dies off
299+
defer func() {
300+
if p.forkDrop != nil {
301+
p.forkDrop.Stop()
302+
p.forkDrop = nil
303+
}
304+
}()
298305
}
299306
// main loop. handle incoming messages.
300307
for {

0 commit comments

Comments
 (0)