Prevent stopped WebSockets from reconnecting - #528
Open
JamBalaya56562 wants to merge 1 commit into
Open
JamBalaya56562 wants to merge 1 commit into
JamBalaya56562 wants to merge 1 commit into
Conversation
JamBalaya56562
force-pushed
the
fix/websocket-stop-cleanup
branch
4 times, most recently
from
September 15, 2026 10:04
d6b94b7 to
e94ab14
Compare
JamBalaya56562
force-pushed
the
fix/websocket-stop-cleanup
branch
from
September 15, 2026 20:43
e94ab14 to
82389ac
Compare
JamBalaya56562
force-pushed
the
fix/websocket-stop-cleanup
branch
from
September 17, 2026 10:45
82389ac to
fca6c46
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stopping the WebSocket transport could still open another socket: a scheduled retry survived
stop(), and a pending authentication refresh calledreconnect()after stopping. An old socket or refresh callback could also affect a connection started subsequently.This change clears the retry timer, detaches and closes the socket, sets the disconnected state, and closes the transport's disconnected dialog on stop. Connection generations prevent callbacks from a previous connection from reconnecting or changing current state. Explicit restart retains subscriptions, while normal five-second retries and authentication refresh remain supported.
Validation
bun install --frozen-lockfileand Prettier check passed.bun run test:ci: 36 files / 380 tests passed.bun run gen:fontandbun run ng -- build ngclient --configuration productionpassed.Tests use a fake WebSocket, controlled RxJS Subjects, fake timers, and a dialog fake. No real WebSocket server or manual GUI reproduction was used. Shared authentication behavior, API types, dependencies, and lockfiles are unchanged.
Part of #273. Related to #283; this does not claim to resolve every reconnection issue.