suppaftp icon indicating copy to clipboard operation
suppaftp copied to clipboard

fix Async SSL file uploads not properly closing

Open mousetail opened this issue 1 year ago • 1 comments

ISSUE NUMBER - PULL_REQUEST_TITLE

Fixes #77

Description

Current code relies on drop() to close connections. This seems to not be enough for the SSL connection (perhaps because the close itself also blocks).

An explicit call to .close() seems to fix the issue.

List here your changes

  • Call .close().await

Type of change

Please select relevant options.

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

Checklist

  • [x] My code follows the contribution guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] My changes generate no new warnings
  • [x] I formatted the code with cargo fmt
  • [x] I linted my code using cargo clippy and reports no warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [x] I have introduced no C-bindings
  • [ ] I increased or maintained the code coverage for the project, compared to the previous commit

Acceptance tests

wait for a project maintainer to fulfill this section...

  • [ ] regression test: ...

mousetail avatar Mar 24 '24 10:03 mousetail

The clippy errors seem unrelated to the changes

mousetail avatar Mar 27 '24 06:03 mousetail