fix(degraded): reduce clear timeout from 10 to 5 minutes

Qobuz issues are typically intermittent, 10 minutes was too long
to keep the degraded indicator visible after recovery.

cc
This commit is contained in:
victorrhgap committed 2026-03-25 17:48:03 -06:00
1 parent 904502c57c
commit 543e6cd123
1 file changed
+2 -2
+2 -2
View File
@@ -1,13 +1,13 @@
/**
* Tracks Qobuz service degradation (repeated 504/server errors).
* Shows a visual indicator when the service is having issues.
* Auto-clears after 10 minutes without new errors.
* Auto-clears after 5 minutes without new errors.
*/
let degraded = false;
let lastErrorTime = 0;
let clearTimer: ReturnType<typeof setTimeout> | null = null;
const CLEAR_TIMEOUT_MS = 10 * 60 * 1000; // 10 minutes
const CLEAR_TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes
const listeners = new Set<() => void>();
function notifyListeners() {