Skip to content

Commit 2be2842

Browse files
karalabeobscuren
authored andcommitted
[release/1.3.4] eth/downloader: fix premature exit before notifying all part fetchers
(cherry picked from commit 64ee576)
1 parent c2df9d3 commit 2be2842

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

eth/downloader/downloader.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1230,9 +1230,11 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error {
12301230
case ch <- false:
12311231
case <-d.cancelCh:
12321232
}
1233-
return nil
12341233
}
12351234
}
1235+
if !cont {
1236+
return nil
1237+
}
12361238
// Queue not yet full, fetch the next batch
12371239
from += uint64(len(headers))
12381240
getHeaders(from)

0 commit comments

Comments
 (0)