From 05e563465321c101a3a0033a85d1c34e1d854c73 Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Fri, 5 Aug 2022 09:01:17 +0700 Subject: [PATCH] snap indexing: fix logging #4937 --- turbo/snapshotsync/block_snapshots.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/turbo/snapshotsync/block_snapshots.go b/turbo/snapshotsync/block_snapshots.go index fae03e509..7d6c4c5a2 100644 --- a/turbo/snapshotsync/block_snapshots.go +++ b/turbo/snapshotsync/block_snapshots.go @@ -794,7 +794,10 @@ func BuildMissedIndices(ctx context.Context, dir string, chainID uint256.Int, tm for { select { - case err := <-errs: + case err, ok := <-errs: + if !ok { + return nil + } if err != nil { return err }