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

properly drop h2 connection #1926

Merged
merged 7 commits into from
Feb 7, 2021
Merged

properly drop h2 connection #1926

merged 7 commits into from
Feb 7, 2021

Conversation

fakeshadow
Copy link
Contributor

PR Type

Bug Fix

PR Checklist

  • Documentation comments have been added / updated.
  • Format code with the latest stable rustfmt.
  • (Team) Label with affected crates and semver status.

Overview

Wake up h2::client::Connection and resolve it's task when dropping h2::client::SendRequest

Closes #1123

@fakeshadow fakeshadow added A-awc project: awc A-http project: actix-http B-semver-norelease change that does not require a release labels Jan 24, 2021
@robjtede
Copy link
Member

robjtede commented Feb 6, 2021

Is there a sensible test case (even manual) for this or wsa fix verified using the code sample from the issue?

@fakeshadow
Copy link
Contributor Author

fakeshadow commented Feb 6, 2021

Is there a sensible test case (even manual) for this or wsa fix verified using the code sample from the issue?

I want to rework this use the join handle instead of a custom drop type with channel.
Test would be added with it

@robjtede robjtede marked this pull request as draft February 6, 2021 16:40
@fakeshadow
Copy link
Contributor Author

fakeshadow commented Feb 6, 2021

@robjtede
I notice join handle is not export in the current actix-rt master branch use. So I add a test for manual drop and JoinHandle can be a future goal for refactor.

@fakeshadow fakeshadow marked this pull request as ready for review February 6, 2021 17:35
@robjtede
Copy link
Member

robjtede commented Feb 6, 2021

@fakeshadow
Copy link
Contributor Author

huh? https://github.com/actix/actix-net/blob/master/actix-rt/src/lib.rs#L94

Sorry my English is garbage. What I meant to say was actix-rt is pinned to 2.0.0-beta.2 in actix-web repo where JoinHandle is still not export yet.

Copy link
Member

@robjtede robjtede left a comment

Choose a reason for hiding this comment

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

much cleaner with the join handle approach, nice job

@robjtede robjtede merged commit 830fb2c into master Feb 7, 2021
@robjtede robjtede deleted the fix/client_drop_h2 branch February 7, 2021 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-awc project: awc A-http project: actix-http B-semver-norelease change that does not require a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

actix-client doesn't close HTTP2 connection when run out of conn_lifetime
2 participants