mirror of
https://github.com/smittix/intercept.git
synced 2026-06-08 14:11:54 -07:00
Prevent Morse start timeout aborts on slow startup
This commit is contained in:
+1
-1
@@ -436,7 +436,7 @@ def start_morse() -> Response:
|
||||
)
|
||||
decoder_thread.start()
|
||||
|
||||
startup_deadline = time.monotonic() + 2.5
|
||||
startup_deadline = time.monotonic() + 2.0
|
||||
startup_ok = False
|
||||
startup_error = ''
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ var MorseMode = (function () {
|
||||
var SETTINGS_KEY = 'intercept.morse.settings.v3';
|
||||
var STATUS_POLL_MS = 5000;
|
||||
var LOCAL_STOP_TIMEOUT_MS = 2200;
|
||||
var START_TIMEOUT_MS = 10000;
|
||||
var START_TIMEOUT_MS = 20000;
|
||||
|
||||
var state = {
|
||||
initialized: false,
|
||||
@@ -85,6 +85,11 @@ var MorseMode = (function () {
|
||||
}
|
||||
return data;
|
||||
});
|
||||
}).catch(function (err) {
|
||||
if (err && err.name === 'AbortError') {
|
||||
throw new Error('Request timed out while waiting for decoder startup');
|
||||
}
|
||||
throw err;
|
||||
}).finally(function () {
|
||||
if (timeoutId) clearTimeout(timeoutId);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user