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

fix Async SSL file uploads not properly closing #78

Merged
merged 4 commits into from
May 18, 2024
Merged

Conversation

mousetail
Copy link
Contributor

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.

  • 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

  • My code follows the contribution guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I formatted the code with cargo fmt
  • 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
  • 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: ...

@@ -39,6 +39,7 @@ pin-project = { version = "^1", optional = true }
# secure
native-tls-crate = { package = "native-tls", version = "^0.2", optional = true }
rustls-crate = { package = "rustls", version = "^0.21", optional = true }
futures-lite = "2.0.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was already a transitive dependency so doesn't add anything

@mousetail
Copy link
Contributor Author

The clippy errors seem unrelated to the changes

@veeso veeso merged commit 18bbcc5 into veeso:main May 18, 2024
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.

[BUG] - put_file does not work with Async SSL Native TLS
2 participants