You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
channels don't work unless a reference to SSHClient is explicitly kept #44
Using an instance of Channel received from somewhere without a reference to SSHClient being explicitly kept (to prevent it from being garbage collected) sometimes gives unexpected results. For instance, a call to exec_command() raises an exception about the channel being closed, while recv_exit_status() just returns -1.
Thanks for this bug report -- my SFTP session was mysteriously getting closed and I couldn't figure out why!
Is this the intended design for paramiko? This is caused by the SSHClient being registered with the ResourceManager to close its transport when it gets collected. This certainly surprised me, but if it's the intended behavior, maybe it should be documented somewhere.
This design well predates my involvement so I've got no ready answers. If somebody wants to dig into the Git history for clues or suggest either a doc or API addition to help make this less confusing/surprising, I'd consider a merge.
Activity
glasserc commentedon Mar 25, 2013
Thanks for this bug report -- my SFTP session was mysteriously getting closed and I couldn't figure out why!
Is this the intended design for paramiko? This is caused by the SSHClient being registered with the ResourceManager to close its transport when it gets collected. This certainly surprised me, but if it's the intended behavior, maybe it should be documented somewhere.
bitprophet commentedon Apr 28, 2013
This design well predates my involvement so I've got no ready answers. If somebody wants to dig into the Git history for clues or suggest either a doc or API addition to help make this less confusing/surprising, I'd consider a merge.
Add back-reference from Transport to the SSHClient that created it
Add back-reference from Transport to the SSHClient that created it
Changelog closes #44, closes #891
Add back-reference from Transport to the SSHClient that created it
Changelog closes #44, closes #891
Add back-reference from Transport to the SSHClient that created it
Add back-reference from Transport to the SSHClient that created it
Merge pull request paramiko#44 from ploxiln/kex_pref_group16_low