Skip to content

GH-3168: Fix FtpSession warning on logout#3174

Merged
garyrussell merged 1 commit intospring-projects:masterfrom
artembilan:GH-3168
Feb 11, 2020
Merged

GH-3168: Fix FtpSession warning on logout#3174
garyrussell merged 1 commit intospring-projects:masterfrom
artembilan:GH-3168

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