From dfa8eb8d61a378173c201663244bc4dcbcae2856 Mon Sep 17 00:00:00 2001 From: zurdi Date: Fri, 18 Sep 2026 04:12:58 +0200 Subject: [PATCH] fix(player): stop retrying the save every second while the server is down The sync tick re-offers a failed upload on every pass, so an outage turned into a failing request a second for as long as it lasted. While the connection layer knows the server is down, a write now holds its bytes and frame and makes no request at all; the next tick after the connection comes back hands them over. A failure from a server that did answer (a refusal, or a 5xx before the outage is noticed, or the v1 shell, which runs no connection probe) spaces the retries out from 2s to 30s instead, and that wait starts over once an upload lands or the connection returns. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01QTsTgdoBinvvxzXeLUjBmV --- .../src/views/Player/EmulatorJS/Player.vue | 35 +++++++++++-- .../src/views/Player/EmulatorJS/utils.test.ts | 51 +++++++++++++++++++ frontend/src/views/Player/EmulatorJS/utils.ts | 25 +++++++++ 3 files changed, 107 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/Player/EmulatorJS/Player.vue b/frontend/src/views/Player/EmulatorJS/Player.vue index 208d1db58..aa0eedc17 100644 --- a/frontend/src/views/Player/EmulatorJS/Player.vue +++ b/frontend/src/views/Player/EmulatorJS/Player.vue @@ -1,7 +1,14 @@