aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader/downloader.go
diff options
context:
space:
mode:
Diffstat (limited to 'eth/downloader/downloader.go')
-rw-r--r--eth/downloader/downloader.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index 8cb0d21f7..f6dbb4610 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -326,6 +326,8 @@ func (d *Downloader) synchronise(id string, hash common.Hash, td *big.Int, mode
d.cancelCh = make(chan struct{})
d.cancelLock.Unlock()
+ defer d.cancel() // No matter what, we can't leave the cancel channel open
+
// Set the requested sync mode, unless it's forbidden
d.mode = mode
if d.mode == FastSync && d.noFast {