Skip to content

Commit

Permalink
Quiet context.Canceled errors during shutdown
Browse files Browse the repository at this point in the history
Runnable implementations that return ctx.Err() cause a spurious
"error received after stop" log message.
  • Loading branch information
cbandy committed Mar 30, 2024
1 parent 2136860 commit b7e8ceb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/manager/internal.go
Expand Up @@ -485,8 +485,8 @@ func (cm *controllerManager) engageStopProcedure(stopComplete <-chan struct{}) e
cm.internalCancel()
})
select {
case err, ok := <-cm.errChan:
if ok {
case err := <-cm.errChan:
if !errors.Is(err, context.Canceled) {
cm.logger.Error(err, "error received after stop sequence was engaged")
}
case <-stopComplete:
Expand Down

0 comments on commit b7e8ceb

Please sign in to comment.