Skip to content

Commit d1708cb

Browse files
committed
Only warn on SSE failure when there is an actual failure
Signed-off-by: Danny Kopping <dannykopping@gmail.com>
1 parent 9359efa commit d1708cb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

coderd/workspaceagents.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,9 @@ func (api *API) workspaceAgentReinit(rw http.ResponseWriter, r *http.Request) {
11401140
Reason: agentsdk.ReinitializeReasonPrebuildClaimed,
11411141
},
11421142
})
1143-
log.Warn(ctx, "failed to send SSE response to trigger reinit", slog.Error(err))
1143+
if err != nil {
1144+
log.Warn(ctx, "failed to send SSE response to trigger reinit", slog.Error(err))
1145+
}
11441146
}
11451147
}
11461148
}

0 commit comments

Comments
 (0)