diff options
Diffstat (limited to 'eth/handler.go')
-rw-r--r-- | eth/handler.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/eth/handler.go b/eth/handler.go index 01550e6c2..1d5a04100 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -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 { |