Commit 65d38a8 1 parent 3fd5845 commit 65d38a8 Copy full SHA for 65d38a8
File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,10 @@ func (s *Scanner) threadedScanAndPin() {
250
250
251
251
// Start a thread that will print intermediate scanning statistics.
252
252
statsCh := make (chan struct {})
253
+ err = s .staticTG .Add ()
254
+ if err != nil {
255
+ return // the threadgroup is stopped
256
+ }
253
257
go s .threadedPrintStats (statsCh )
254
258
255
259
// Start N threads that will scan for underpinned skylinks and repin
@@ -279,6 +283,7 @@ func (s *Scanner) threadedScanAndPin() {
279
283
// threadedPrintStats prints regular updates on the scanning process plus a
280
284
// final overview of the pinned and skipped skylinks.
281
285
func (s * Scanner ) threadedPrintStats (stopCh chan struct {}) {
286
+ defer s .staticTG .Done ()
282
287
intermediateStatsTicker := time .NewTicker (printPinningStatisticsPeriod )
283
288
defer intermediateStatsTicker .Stop ()
284
289
You can’t perform that action at this time.
0 commit comments