fix(site): do not error on closed build logs stream (#16067)

Related: https://github.com/coder/coder/issues/15937
This commit is contained in:
Marcin Tojek
2025-01-09 13:43:20 +01:00
committed by GitHub
parent 401f8b4fea
commit 20c36a655a
+3
View File
@@ -280,6 +280,9 @@ export const watchBuildLogsByBuildId = (
);
socket.addEventListener("error", () => {
if (socket.readyState === socket.CLOSED) {
return;
}
onError?.(new Error("Connection for logs failed."));
socket.close();
});