Skip to content

Commit

Permalink
better exit on context cancelled
Browse files Browse the repository at this point in the history
  • Loading branch information
gosom committed May 13, 2023
1 parent 849f5dd commit 75ce714
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scrapemate.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,10 @@ func (s *ScrapeMate) startWorker(ctx context.Context) {
case <-ctx.Done():
return
case err := <-errc:
if ctx.Err() == context.Canceled {
return
}

s.log.Error("error while getting jobs...going to wait a bit", "error", err)

time.Sleep(1 * time.Second)
Expand Down

0 comments on commit 75ce714

Please sign in to comment.