diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-07-22 16:57:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-22 16:57:43 +0800 |
commit | c646d287f84e50b9c4bd9cabdfa7773035f508b7 (patch) | |
tree | fb16d63101958266f355245d8593c3e0d6d31076 /eth | |
parent | f273c64a946999af5f51c324f362870f03715d5d (diff) | |
parent | 91f18ffd47d766b1493016da6802befbf9739709 (diff) | |
download | dexon-c646d287f84e50b9c4bd9cabdfa7773035f508b7.tar dexon-c646d287f84e50b9c4bd9cabdfa7773035f508b7.tar.gz dexon-c646d287f84e50b9c4bd9cabdfa7773035f508b7.tar.bz2 dexon-c646d287f84e50b9c4bd9cabdfa7773035f508b7.tar.lz dexon-c646d287f84e50b9c4bd9cabdfa7773035f508b7.tar.xz dexon-c646d287f84e50b9c4bd9cabdfa7773035f508b7.tar.zst dexon-c646d287f84e50b9c4bd9cabdfa7773035f508b7.zip |
Merge pull request #2833 from karalabe/fix-dao-challenge-annoyance
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 { |