Skip to content

fix(kopiaui): fix status-poll socket leak in KopiaUI - #5574

Open
ElCruncharino wants to merge 1 commit into
kopia:masterfrom
ElCruncharino:fix/kopia-ui-status-poll-socket-leak
Open

fix(kopiaui): fix status-poll socket leak in KopiaUI#5574
ElCruncharino wants to merge 1 commit into
kopia:masterfrom
ElCruncharino:fix/kopia-ui-status-poll-socket-leak

Conversation

@ElCruncharino

Copy link
Copy Markdown

Found this while debugging a growing number of ephemeral ports held open
by kopia on my machine, traced back to the KopiaUI status-poll loop.

pollOnce() in app/public/server.js never drains the response body on a
non-200 status, and never handles the timeout event on the request (the
timeout option added in #3055 only emits an event, it doesn't abort
anything on its own). Both leave the underlying socket open instead of
being freed, one leaked connection per affected 3-second poll for as long
as the app runs.

This adds handling for both cases so the socket is released every time.

@ElCruncharino
ElCruncharino requested a review from a team August 19, 2026 19:23
pollOnce() never drained the response body on a non-200 status, and
never handled the "timeout" event on the request (the timeout option
added in kopia#3055 only emits an event, it doesn't abort anything on its
own). Both leave the underlying socket open forever instead of being
freed, one leaked connection per affected 3-second poll for as long as
the app runs.
@ElCruncharino
ElCruncharino force-pushed the fix/kopia-ui-status-poll-socket-leak branch from 674868a to 27ad296 Compare August 24, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant