Ticket #2782 defect new
Channel is not notified, if Connection fails between openChannel and ssh_CHANNEL_OPEN_CONFIRM
| Reported by: | cebewee | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | conch | Keywords: | |
| Cc: | Branch: | ||
| Author: | Launchpad Bug: |
Description
There is a race condition in twisted.conch.ssh.connection.SSHConnection: Since commit 20700, channelClosed ignores half-open channels (openChannel was called, but not yet ssh_CHANNEL_OPEN_CONFIRM). So if channelClosed is called by serviceStopped due to a connection loss, neither ssh_CHANNEL_OPEN_CONFIRM nor ssh_CHANNEL_OPEN_FAILURE is ever called.
So an application expecting either SSHChannel.channelOpen or SSHChannel.openFailed to be called, will wait infinitely. Maybe SSHConnection.channelClosed should call SSHChannel.openFailed in the channel-not-yet-really-open case?
Change History
Note: See
TracTickets for help on using
tickets.
