mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(site): do not error on closed build logs stream (#16067)
Related: https://github.com/coder/coder/issues/15937
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user