[stable-25.0.x] Bugfix/6710/fix multiple websockets - #6748
Merged
Merged
Conversation
WebSocketConnectionHelper only reused the cached WebSocketInstance for a user while it reported isConnected() == true. Since the ping interval added in #6543 makes the connection cycle through a brief disconnected state every 30-60s by design, any caller (ChatActivity, CallActivity, WebsocketConnectionsWorker) asking for the instance during that window got handed a brand new WebSocketInstance instead, orphaning the old one which kept retrying unsupervised in the background. Within a single instance, restartWebSocket() could also be triggered concurrently (from sendMessage, processErrorMessage, closeWebSocket) without cancelling any socket already in flight, and a stale/superseded socket's failure would still force a reconnect of the current one. Both issues together produced the "5-13 parallel sockets" / repeated "Closing previous client ... for session X" churn from #6710. Fixes #6710. Assisted-by: Claude Code:claude-sonnet-5 Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Contributor
|
APK file: https://github.com/nextcloud/talk-android/actions/runs/35648215030/artifacts/10661332902 |
AndyScherzinger
approved these changes
Sep 21, 2026
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.
Backport of PR #6737