Skip to content
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

Improve error handling in InputStream.close() for SFTP channels #330

Closed
stsiano opened this issue May 24, 2023 · 0 comments · Fixed by #331
Closed

Improve error handling in InputStream.close() for SFTP channels #330

stsiano opened this issue May 24, 2023 · 0 comments · Fixed by #331

Comments

@stsiano
Copy link
Contributor

stsiano commented May 24, 2023

For most _sendClose() calls in ChannelSFftp the errors are handled just fine. However there is one exception:
When an exception is happening in the close() method of the anonymous InputStream() implementation in
https://github.com/mwiede/jsch/blob/master/src/main/java/com/jcraft/jsch/ChannelSftp.java#L1497
the Exception that was causing the error will be swallowed and replaced by an IOException with the error text "error".

This makes error analysis really difficult in these cases. Is it possible to preserve the original exception somehow (as in all the other calls of _sendClose()?

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 a pull request may close this issue.

1 participant