Skip to content

GH-3168: Fix FtpSession warning on logout #3174

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

Merged
merged 1 commit into from
Feb 11, 2020

Conversation

artembilan
Copy link
Member

Fixes #3168

  • Call this.client.noop() instead of this.client.isConnected() to really
    check that client has a live connection with the server before calling a this.client.logout()
  • Wrap this.client.logout() into a try..catch to be sure that we wil call a
    this.client.disconnect() even if logout() fails for some reason.
  • Change WARN logs about Session.close() into a DEBUG level -
    when we have a problem with closing session because of server disconnect reason
    we have no any control to do with a situation

Cherry-pick to 5.2.x

Fixes spring-projects#3168

* Call `this.client.noop()` instead of `this.client.isConnected()` to really
check that client has a live connection with the server before calling a `this.client.logout()`
* Wrap `this.client.logout()` into a `try..catch` to be sure that we wil call a
`this.client.disconnect()` even if `logout()` fails for some reason.
* Change `WARN` logs about `Session.close()` into a `DEBUG` level -
when we have a problem with closing session because of server disconnect reason
we have no any control to do with a situation

**Cherry-pick to 5.2.x**
@artembilan
Copy link
Member Author

@jonforums,

FYI if you wish to review.

Thanks

@garyrussell
Copy link
Contributor

LGTM; will merge in the morning unless we hear otherwise from @jonforums

@jonforums
Copy link

LGTM, thanks!

@garyrussell garyrussell merged commit aeab030 into spring-projects:master Feb 11, 2020
@garyrussell
Copy link
Contributor

Cherry-picked as 23b1a9f

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.

Another "FtpSession - failed to disconnect FTPClient"
3 participants