aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-07-19 17:00:09 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-07-19 17:00:09 +0800
commit91f18ffd47d766b1493016da6802befbf9739709 (patch)
tree09ac048cfddccc25a731e7857d10fff5a1a168b4 /eth
parenta4c4125b1155d9276614029163b498a17643f0f2 (diff)
downloadgo-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.go7
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 {