Treat a Chat bridge channel that ends before any answer as unavailable - #748
Merged
Merged
Conversation
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.
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.
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.requestnow raisesChatBridgeUnavailablewhen the channel ends before any byte of the answer. TheChannelOpenErrorpath does not change. A non-empty line that is not JSON still raisesChatBridgeError.Bridge.is_runningalready readsChatBridgeUnavailableas "not running", soBridge.startnow uploads and starts the bridge on a docker-sbx host instead of failing.LoginWindow.streamdoes not change. When VNC does not listen, the socket now closes normally right afteraccept(), where before the route closed it with 1011. The login window page shows "Connection closed" in both cases.LoginWindow.openwaits 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.