Repository navigation
fix(android): one session per reconnect, so the output is not written twice - #72
Merged
Merged
Conversation
… twice Reconnect queued the bridge every time it was pressed while the network was down. When the network came back, the bridge started its session once per press, and each transport kept a relay writing into the same emulator at a different offset: the output repeated in pieces, and clearing the screen hid it until the next output. A reconnect now queues a bridge once. startConnection also ends the tab-atelier transport it replaces, so a session still redialling cannot keep its relay reading. Claude-Session: https://claude.ai/code/session_01G6dpqPucDGns6rELSQeSdr
… back docs/upstream/ goes through the fork's changes under connectbot/, against the upstream base e484bd3a and the current upstream HEAD 1798d07. Each group says whether it can be offered upstream and how, and the index lists every changed file with the number of upstream commits that touched it since the base. The fork is not moved to the newer upstream here; that is a separate sync. Claude-Session: https://claude.ai/code/session_01G6dpqPucDGns6rELSQeSdr
…s own NetworkInfo The test mocked Android's NetworkInfo, but getCurrentNetworkInfo returns the monitor's nested data class, so the unit test build failed to compile. Claude-Session: https://claude.ai/code/session_01G6dpqPucDGns6rELSQeSdr
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.
Symptom
After a reconnect the terminal output repeated at different offsets. Ctrl+L hid it until more output arrived. Opening the reconnect menu again made it worse.
Cause
reconnectPendingstarted the session once per queued entry, so one bridge opened several transports.startConnectionswapped in a new transport without closing the old one. A tab-atelier session still redialling kept its relay reading into the same emulator, so the new relay wrote the same replay a second time.Change
requestReconnectqueues a bridge only once.startConnectioncloses the tab-atelier transport it replaces. SSH is left alone because itsclose()defers during a network grace period.reconnectingWhileOfflineStartsTheSessionOnce.Not verified on a device
The unit test covers the queue; the relay behaviour needs a run against a real daemon.
Generated by Claude Code