Skip to content

Commit c84a637

Browse files
authored
fix: stop logging error on query canceled (coder#12017)
Fixes flake seen here: https://github.com/coder/coder/actions/runs/7782340530/job/21218566449
1 parent b73e66e commit c84a637

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

coderd/workspaceagentsrpc.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,9 @@ func (m *agentConnectionMonitor) monitor(ctx context.Context) {
473473
err = m.updateConnectionTimes(ctx)
474474
if err != nil {
475475
reason = err.Error()
476-
m.logger.Error(ctx, "failed to update agent connection times", slog.Error(err))
476+
if !database.IsQueryCanceledError(err) {
477+
m.logger.Error(ctx, "failed to update agent connection times", slog.Error(err))
478+
}
477479
return
478480
}
479481
if connectionStatusChanged {

0 commit comments

Comments
 (0)