mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5658] checkVersion leaks a pending health fetch per visibility flip, saturating the browser connection pool #3135
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#3135
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Aug 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5658
Originally assigned to: @kolacheee on GitHub.
What happens
checkVersioninpackages/client/src/App.tsxfires a/api/healthfetch with no timeout and no in-flight guard, and it runs on every visibility change. Against a frozen server (connections accepted, never answered — the Android/Termux freezer state we just triaged), each tab-switch to the app leaks one more permanently-pending fetch.Firefox caps ~6 concurrent connections per host, so a few visibility flips while the server is frozen saturate the pool — at which point even the requests that do carry timeouts (the 10s loopback keep-alive heartbeat, any user-triggered fetches) queue behind dead connections and stop behaving. The client's degraded state gets progressively worse the more the user pokes at it, which matches how the field report described it.
The fix
Give
checkVersionan in-flight guard (skip if the previous check hasn't settled) and anAbortSignal.timeout. Both are a few lines.Try it yourself
kill -STOPthe server, then switch away from and back to the app tab several times with the network panel open: one pending/api/healthper flip, never settling.kill -CONTreleases them all at once.Found during the Termux background-freeze triage; the general unreachable-state UX is filed separately.
@kolacheee commented on GitHub (Aug 29, 2026):
Termux background-freeze follow-up family (from the 2026-08-30 triage; verdict: the battery-efficiency waves removed the ambient polling that had kept vendor freezers from classifying backgrounded Termux as dormant — see #4956 for the first field report): #5655 server freeze detector, #5656 wake-lock surfacing, #5657 client unreachable-state UX, #5658 checkVersion fetch leak, #5659 TROUBLESHOOTING corrections.
@kolacheee commented on GitHub (Aug 30, 2026):
Taking this together with #5657 (kolacheee + Claude agent) on branch fix/5657-5658-unreachable-server; draft PR to follow.