From 50e096e627c8c07b4dda3a7221dda5f32dc5c5cb Mon Sep 17 00:00:00 2001 From: obscuren Date: Sat, 18 Apr 2015 23:56:08 +0200 Subject: downloader: don't remove peers. keep them around --- eth/downloader/downloader.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'eth/downloader/downloader.go') diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 2f98a1414..8f955b483 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -176,6 +176,7 @@ out: var peer *peer = sync.peer err := d.getFromPeer(peer, sync.hash, sync.ignoreInitial) if err != nil { + glog.V(logger.Detail).Infoln(err) break } @@ -301,7 +302,7 @@ out: d.queue.reset() d.peers.reset() - return errPeersUnavailable + return fmt.Errorf("%v avaialable = %d. total = %d", errPeersUnavailable, len(availablePeers), len(d.peers)) } } else if len(d.queue.fetching) == 0 { @@ -321,7 +322,7 @@ out: if time.Since(chunk.itime) > blockTtl { badPeers = append(badPeers, pid) // remove peer as good peer from peer list - d.UnregisterPeer(pid) + //d.UnregisterPeer(pid) } } d.queue.mu.Unlock() -- cgit v1.2.3