mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: stop logging context Canceled as error (#11177)
fixes #11166 and a related log that could have the same problem
This commit is contained in:
@@ -639,7 +639,7 @@ func (m *mapper) run() {
|
||||
m.logger.Debug(m.ctx, "skipping nil node update")
|
||||
continue
|
||||
}
|
||||
if err := m.c.Enqueue(update); err != nil {
|
||||
if err := m.c.Enqueue(update); err != nil && !xerrors.Is(err, context.Canceled) {
|
||||
m.logger.Error(m.ctx, "failed to enqueue node update", slog.Error(err))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -810,7 +810,7 @@ func v1RespLoop(ctx context.Context, cancel context.CancelFunc, logger slog.Logg
|
||||
continue
|
||||
}
|
||||
err = q.Enqueue(nodes)
|
||||
if err != nil {
|
||||
if err != nil && !xerrors.Is(err, context.Canceled) {
|
||||
logger.Error(ctx, "v1RespLoop failed to enqueue v1 update", slog.Error(err))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user