Skip to content

Commit

Permalink
Fix build (#1119)
Browse files Browse the repository at this point in the history
Seems like an parallel edits caused build to fail @mh0lt
  • Loading branch information
Somnath Banerjee authored Sep 10, 2023
1 parent 7c47180 commit 9b4a1c6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ func (s *AggStats) clone() *AggStats {
UploadRate: s.UploadRate,
DownloadRate: s.DownloadRate,
}
sc.DroppedCompleted.Store(s.DroppedCompleted.Load())
sc.DroppedTotal.Store(s.DroppedTotal.Load())
atomic.StoreUint64(&sc.DroppedCompleted, atomic.LoadUint64(&s.DroppedCompleted))
atomic.StoreUint64(&sc.DroppedTotal, atomic.LoadUint64(&s.DroppedTotal))

return sc
}

Expand All @@ -107,8 +108,9 @@ func (s *AggStats) copy(o *AggStats) *AggStats {
s.BytesUpload = o.BytesUpload
s.UploadRate = o.UploadRate
s.DownloadRate = o.DownloadRate
s.DroppedCompleted.Store(o.DroppedCompleted.Load())
s.DroppedTotal.Store(o.DroppedTotal.Load())
atomic.StoreUint64(&s.DroppedCompleted, atomic.LoadUint64(&o.DroppedCompleted))
atomic.StoreUint64(&s.DroppedTotal, atomic.LoadUint64(&o.DroppedTotal))

return s
}

Expand Down

0 comments on commit 9b4a1c6

Please sign in to comment.