Skip to content

Commit bf3b35b

Browse files
authored
fix: stop logging context Canceled as error (#11177)
fixes #11166 and a related log that could have the same problem
1 parent 43ba314 commit bf3b35b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

enterprise/tailnet/pgcoord.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ func (m *mapper) run() {
639639
m.logger.Debug(m.ctx, "skipping nil node update")
640640
continue
641641
}
642-
if err := m.c.Enqueue(update); err != nil {
642+
if err := m.c.Enqueue(update); err != nil && !xerrors.Is(err, context.Canceled) {
643643
m.logger.Error(m.ctx, "failed to enqueue node update", slog.Error(err))
644644
}
645645
}

tailnet/coordinator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ func v1RespLoop(ctx context.Context, cancel context.CancelFunc, logger slog.Logg
810810
continue
811811
}
812812
err = q.Enqueue(nodes)
813-
if err != nil {
813+
if err != nil && !xerrors.Is(err, context.Canceled) {
814814
logger.Error(ctx, "v1RespLoop failed to enqueue v1 update", slog.Error(err))
815815
}
816816
}

0 commit comments

Comments
 (0)