diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-07-19 17:00:09 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-07-19 17:00:09 +0800 |
commit | 91f18ffd47d766b1493016da6802befbf9739709 (patch) | |
tree | 09ac048cfddccc25a731e7857d10fff5a1a168b4 /eth | |
parent | a4c4125b1155d9276614029163b498a17643f0f2 (diff) | |
download | go-tangerine-91f18ffd47d766b1493016da6802befbf9739709.tar go-tangerine-91f18ffd47d766b1493016da6802befbf9739709.tar.gz go-tangerine-91f18ffd47d766b1493016da6802befbf9739709.tar.bz2 go-tangerine-91f18ffd47d766b1493016da6802befbf9739709.tar.lz go-tangerine-91f18ffd47d766b1493016da6802befbf9739709.tar.xz go-tangerine-91f18ffd47d766b1493016da6802befbf9739709.tar.zst go-tangerine-91f18ffd47d766b1493016da6802befbf9739709.zip |
eth: cancel DAO challenge on peer drop (annoying log)
Diffstat (limited to 'eth')
-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 { |