-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Leave websocket transport open if receive times out or is cancelled #8251
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8251 +/- ##
=======================================
Coverage 97.56% 97.56%
=======================================
Files 107 107
Lines 32936 32999 +63
Branches 3851 3853 +2
=======================================
+ Hits 32133 32196 +63
Misses 602 602
Partials 201 201
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Tested on production. No adverse effects observed. Old behavior restored without the leak |
And this still fixes the leak from before? I was thinking that we'd close the connection if the connection timed out (indicating that we may have lost the connection), but would keep the connection if it was cancelled externally. |
Also, setting the close code to abnormal closure still seems like we're attempting to close the connection to me. That still doesn't seem like the right behaviour when the task has been cancelled externally. I think no action should be taken in that situation (though, if someone is always putting a timeout on, then maybe there are issues with it never detecting the connection is timed out?). |
Yes, the original problem was in |
I did a strait revert to the previous version, but I agree that seems wrong as well. I think it should simply raise here instead |
… from BaseException
I made that change in the code, but I'm too tired to retest it so marked it back as draft until I've had more sleep and can test it properly |
Functional testing looks good on production |
Everything ran ok overnight. Nothing in the logs. All looks good |
Backport to 3.9: 💚 backport PR created✅ Backport PR branch: Backported as #8263 🤖 @patchback |
Backport to 3.10: 💚 backport PR created✅ Backport PR branch: Backported as #8264 🤖 @patchback |
…receive times out or is cancelled (#8264) Co-authored-by: J. Nick Koston <nick@koston.org>
…eceive times out or is cancelled (#8263) Co-authored-by: J. Nick Koston <nick@koston.org>
What do these changes do?
Leave websocket transport open if receive times out or is cancelled.
This change restores the behavior before #7978
See #7978 (comment)
Are there changes in behavior for the user?
The connection is left open if the receive call times out or is cancelled
Is it a substantial burden for the maintainers to support this?
no
Related issue number
#7978 (comment)
Checklist
CONTRIBUTORS.txt
CHANGES/
foldername it
<issue_or_pr_num>.<type>.rst
(e.g.588.bugfix.rst
)if you don't have an issue number, change it to the pull request
number after creating the PR
.bugfix
: A bug fix for something the maintainers deemed animproper undesired behavior that got corrected to match
pre-agreed expectations.
.feature
: A new behavior, public APIs. That sort of stuff..deprecation
: A declaration of future API removals and breakingchanges in behavior.
.breaking
: When something public is removed in a breaking way.Could be deprecated in an earlier release.
.doc
: Notable updates to the documentation structure or buildprocess.
.packaging
: Notes for downstreams about unobvious side effectsand tooling. Changes in the test invocation considerations and
runtime assumptions.
.contrib
: Stuff that affects the contributor experience. e.g.Running tests, building the docs, setting up the development
environment.
.misc
: Changes that are hard to assign to any of the abovecategories.
Make sure to use full sentences with correct case and punctuation,
for example:
Use the past tense or the present tense a non-imperative mood,
referring to what's changed compared to the last released version
of this project.