Skip to content

Commit 3247ee9

Browse files
committed
fixup
1 parent 58507f2 commit 3247ee9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/dashboard/src/data/workspaces/listen-to-workspace-ws-messages.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const disposableWatchWorkspaceStatus = (
5757
const abortController = new AbortController();
5858

5959
(async () => {
60-
while (!abortController.signal) {
60+
while (!abortController.signal.aborted) {
6161
try {
6262
const it = workspaceClient.watchWorkspaceStatus(
6363
{ workspaceId },
@@ -67,10 +67,11 @@ export const disposableWatchWorkspaceStatus = (
6767
);
6868
for await (const response of it) {
6969
cb(response);
70+
backoff = BASE_BACKOFF;
7071
}
7172
} catch (e) {
7273
backoff = Math.min(2 * backoff, MAX_BACKOFF);
73-
console.error("failed to watch workspace status:", e);
74+
console.error("failed to watch workspace status, retrying", e);
7475
}
7576
const jitter = Math.random() * 0.3 * backoff;
7677
const delay = backoff + jitter;

0 commit comments

Comments
 (0)