summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/api')
-rw-r--r--src/api/logs.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/api/logs.ts b/src/api/logs.ts
index db37bcd..fd08d56 100644
--- a/src/api/logs.ts
+++ b/src/api/logs.ts
@@ -107,7 +107,10 @@ export function fetchLogs(apiConfig: LogsAPIConfig, appendLog: AppendLogFn) {
}
export function stop() {
- ws.close();
+ if (ws) {
+ ws.close();
+ fetched = false;
+ }
if (controller) controller.abort();
}
@@ -146,6 +149,6 @@ function fetchLogsWithFetch(apiConfig: LogsAPIConfig, appendLog: AppendLogFn) {
// eslint-disable-next-line no-console
console.log('GET /logs error:', err.message);
- }
+ },
);
}