Skip to content

fix(terminal): report a closed transport once - #6

Merged
iscekic merged 1 commit into
mainfrom
fix/closed-once
Nov 13, 2026
Merged

iscekic merged 1 commit into
mainfrom
fix/closed-once

Conversation

@iscekic

@iscekic iscekic commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

After a shell closed, every keystroke sent another onClosed event on both platforms. A transport now reports onClosed exactly once; later writes are dropped until a new source is bound.

Verified on an Android emulator against the OpenSSH test container: before the fix, 12 typed characters after exit produced 12 extra events; after it, exit produces one event, typing produces none, and a reconnect produces one for the new shell. The macOS CI job verifies the iOS build.

Writes through a closed terminal view re-ran the close path, so every later
keystroke emitted another onClosed event. Both platforms now return early once
the transport is closed, and closeTransport emits only on the transition; a
rebound source starts a new cycle.
@iscekic
iscekic merged commit 4179e0b into main Nov 13, 2026
6 checks passed
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