Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2024-11-27 13:12:14 +03:00
parent e89f9fe2a4
commit b14eebcdf3

View file

@ -222,7 +222,14 @@ func (bfs *Service) blockDownloader() {
select {
case <-bfs.ctx.Done():
return
case bfs.blocksCh <- b:
default:
err := bfs.enqueueBlock(b)
if err != nil {
bfs.log.Error("failed to enqueue block", zap.Uint32("index", b.Index), zap.Error(err))
bfs.stopService(true)
return
}
//case bfs.blocksCh <- b:
}
}
}