Skip to content

Treat a Chat bridge channel that ends before any answer as unavailable - #748

Merged
czpython merged 1 commit into
mainfrom
chat-bridge-eof-is-unavailable
Sep 28, 2026
Merged

czpython merged 1 commit into
mainfrom
chat-bridge-eof-is-unavailable

Conversation

@czpython

Copy link
Copy Markdown
Owner

A docker-sbx host's SSH gateway accepts a channel to a closed loopback port and then ends it at once. The client reads an empty line, not asyncssh.ChannelOpenError. A real sshd still refuses the channel. Both signals mean that nothing listens on the port.

Bridge.request now raises ChatBridgeUnavailable when the channel ends before any byte of the answer. The ChannelOpenError path does not change. A non-empty line that is not JSON still raises ChatBridgeError. Bridge.is_running already reads ChatBridgeUnavailable as "not running", so Bridge.start now uploads and starts the bridge on a docker-sbx host instead of failing.

LoginWindow.stream does not change. When VNC does not listen, the socket now closes normally right after accept(), where before the route closed it with 1011. The login window page shows "Connection closed" in both cases. LoginWindow.open waits for the browser to be ready, so a closed VNC port means the window has already failed, and the result for the operator is the same.

A docker-sbx gateway accepts a channel to a closed loopback port and then ends it, so the client reads an empty line instead of getting ChannelOpenError. Bridge.request now raises ChatBridgeUnavailable for both signals, and Bridge.start uploads and starts the bridge on such a host.
@czpython
czpython merged commit 6ae172b into main Sep 28, 2026
3 checks passed
@czpython
czpython deleted the chat-bridge-eof-is-unavailable branch September 28, 2026 08:32
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