-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to close SftpChannel? #1305
Comments
|
Thank you, I understand. So, sftp.end does not close the SSH connection; it only closes the specific channel. I would like to ask, based on my previous description, if closing the channel and reestablishing it is a recommended approach for implementing upload cancellation. I'm not sure if FileZilla or other applications use this approach. The fundamental question is whether each file transfer is conducted through a separate channel. If each file transfer does indeed use a separate channel and closing the channel after a file is completed is the standard practice, then it is reasonable to cancel the transfer by closing the channel. However, if this is not the case and multiple file transfers share the same channel, then there may be an issue with your approach. |
Each call to |
For example, here I use a connection to obtain an SFTP channel. When I'm in the middle of an upload and I want to cancel it without closing the SSH connection, my understanding is that I can simply close this channel, right?
I see that the close method of the channel has two parameters during debugging, but I'm not sure what should be passed specifically.
The text was updated successfully, but these errors were encountered: