Skip to content

Commit

Permalink
Fix signaler not exiting on cancel
Browse files Browse the repository at this point in the history
`break` is incorrect here, as it just breaks out of the select.
`return` to exit the function instead.

Fixes #1636.
  • Loading branch information
isker committed Mar 2, 2022
1 parent 2ddd3ac commit d512aad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/root.go
Expand Up @@ -111,7 +111,7 @@ func startSignaler() (func() error, func(err error)) {
}
log.Info(ctx, "Triggered scan complete", "elapsed", time.Since(start).Round(100*time.Millisecond))
case <-ctx.Done():
break
return nil
}
}
}, func(err error) {
Expand Down

0 comments on commit d512aad

Please sign in to comment.