aboutsummaryrefslogtreecommitdiffstats
path: root/eth/handler.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-24 21:04:58 +0800
committerobscuren <geffobscura@gmail.com>2015-04-24 21:04:58 +0800
commit31f82eb3347454f64f3d41de3087109d09597806 (patch)
treeec641ffa199d3139e8e142dbe3c6e71be0df4fd9 /eth/handler.go
parentb86e7526e12a5a49c1739ec02d3c1c5cc667dcb3 (diff)
downloaddexon-31f82eb3347454f64f3d41de3087109d09597806.tar.gz
dexon-31f82eb3347454f64f3d41de3087109d09597806.tar.zst
dexon-31f82eb3347454f64f3d41de3087109d09597806.zip
eth, eth/downloader: don't require td on downloader. Fixed tests
Diffstat (limited to 'eth/handler.go')
-rw-r--r--eth/handler.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/handler.go b/eth/handler.go
index a1b03f57c..a5bc125da 100644
--- a/eth/handler.go
+++ b/eth/handler.go
@@ -134,14 +134,14 @@ out:
if len(pm.peers) < minDesiredPeerCount {
break
}
- itimer.Stop()
// Find the best peer
peer := getBestPeer(pm.peers)
if peer == nil {
glog.V(logger.Debug).Infoln("Sync attempt cancelled. No peers available")
- return
}
+
+ itimer.Stop()
go pm.synchronise(peer)
case <-itimer.C:
// The timer will make sure that the downloader keeps an active state