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

Do not discard exceptions thrown during sftp close #196

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

henryxparker
Copy link
Contributor

I have been having some connection issues, and I believe the .attempt.flatmap(_ => ...) may have been throwing away a useful exception.

The previous code seems to be using that attempt to ensure that the ssh client gets disconnected at the end, but that is precisely the function of Resource.

I have a feeling I might be missing some deliberate choice that originally went into this, but I suppose only @regis-leray can answer that.

@regis-leray
Copy link
Owner

@henryxparker your implementation, force the user to catch any possible problem if during the connection close process it failed. I would assume it is ok, they will be able to discard the error.

Thanks again for your contribution. if build passed it will be merge

@regis-leray
Copy link
Owner

@henryxparker the build failed, fix it when you have time. Thank you

@regis-leray regis-leray merged commit 1bcef36 into regis-leray:master Jan 5, 2022
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 this pull request may close these issues.

2 participants