Skip to content

Commit

Permalink
Do not log context.Canceled as an error in Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
pior committed Jul 13, 2020
1 parent 925626b commit c35b89f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package runnable

import (
"context"
"errors"
"fmt"
"strings"
"time"
Expand Down Expand Up @@ -71,7 +72,7 @@ func (m *manager) Run(ctx context.Context) error {
case c := <-completedChan:
completed.insert(c)

if c.err == nil {
if c.err == nil || errors.Is(c.err, context.Canceled) {
m.log("%s stopped", c.name())
} else {
m.log("%s stopped with error: %+v", c.name(), c.err)
Expand Down

0 comments on commit c35b89f

Please sign in to comment.