Skip to content

Commit 04dfda8

Browse files
authored
fix: change enqueue error to debug log level (#19686)
fixes coder/internal#958 Logging was being done at error level, but most likely any errors are from simple races between an update triggered around the same time as a client disconnecting. Debug is fine for these.
1 parent d415964 commit 04dfda8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

enterprise/tailnet/pgcoord.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,8 +693,9 @@ func (m *mapper) run() {
693693
m.logger.Debug(m.ctx, "skipping nil node update")
694694
continue
695695
}
696-
if err := m.c.Enqueue(update); err != nil && !xerrors.Is(err, context.Canceled) {
697-
m.logger.Error(m.ctx, "failed to enqueue node update", slog.Error(err))
696+
if err := m.c.Enqueue(update); err != nil {
697+
// lots of reasons this could happen, most usually, the peer has disconnected.
698+
m.logger.Debug(m.ctx, "failed to enqueue node update", slog.Error(err))
698699
}
699700
}
700701
}

0 commit comments

Comments
 (0)