Skip to content

Commit

Permalink
Fix Ready channel (#13736)
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulio2002 authored Feb 7, 2025
1 parent b53b94d commit 7c65a40
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions turbo/snapshotsync/snapshots.go
Original file line number Diff line number Diff line change
Expand Up @@ -601,9 +601,11 @@ func (s *RoSnapshots) VisibleBlocksAvailable(t snaptype.Enum) uint64 {
}

func (s *RoSnapshots) DownloadComplete() {
if !s.SegmentsReady() {
return
}
wasReady := s.downloadReady.Swap(true)

if !wasReady && s.SegmentsReady() {
if !wasReady {
s.ready.set()
}
}
Expand Down

0 comments on commit 7c65a40

Please sign in to comment.