Skip to content

session: preserve latest window size when consumer drains buffer - #17

Merged
raggi merged 1 commit into
masterfrom
raggi/gliderssh-sendwindow
Oct 26, 2026
Merged

raggi merged 1 commit into
masterfrom
raggi/gliderssh-sendwindow

Conversation

@raggi

@raggi raggi commented Oct 26, 2026

Copy link
Copy Markdown
Member

The nonblocking window-change path only retried its send when it drained the stale buffered value itself. If the PTY consumer drained that value first, the latest size was silently lost.

Retry the send after either drain outcome while keeping channel operations nonblocking. Add a per-session test gate and a deterministic regression test for the consumer-drains-before-discard interleaving.

Fixes: #15 / 6662764 (session: don't park request loop on window-change, bound env churn)

The nonblocking window-change path only retried its send when it drained
the stale buffered value itself. If the PTY consumer drained that value
first, the latest size was silently lost.

Retry the send after either drain outcome while keeping channel operations
nonblocking. Add a per-session test gate and a deterministic regression
test for the consumer-drains-before-discard interleaving.

Fixes: #15 / 6662764 (session: don't park request loop on window-change, bound env churn)
@raggi
raggi force-pushed the raggi/gliderssh-sendwindow branch from 5a3122e to 791b498 Compare October 26, 2026 14:32
@raggi raggi changed the title fix(session): preserve latest window size when consumer drains buffer session: preserve latest window size when consumer drains buffer Oct 26, 2026
@raggi
raggi merged commit 31f7cf3 into master Oct 26, 2026
4 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.

2 participants