-
-
Notifications
You must be signed in to change notification settings - Fork 756
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
Handle case when websocket client disconnects before websocket connection is accepted #2312
Conversation
We need a test for this. Also, I think we can check if the transport is closing instead: |
@invisibleroads Are you still interested in working on this? |
Hi Marcelo, I was travelling. Let me look at the test.
Would you prefer the is closing check? I feel the try catch would be safer
because it is more general.
…On Wed, Apr 24, 2024, 6:39 AM Marcelo Trylesinski ***@***.***> wrote:
@invisibleroads <https://github.com/invisibleroads> Are you still
interested in working on this?
—
Reply to this email directly, view it on GitHub
<#2312 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACBDLAPIHWKGEFZX4B2SWDY66DWDAVCNFSM6AAAAABGQ6JJDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZUGY2DONRUGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yes, that's what I said on my last message. We also need a test here. |
@Kludex I tried to recreate the situation where the transport is closed when the server tries to send the 500 error, but I can't get the situation to recreate exactly and don't think mocking would work either.
Whatever I do, the connection keeps closing only after sending the 500 error in the test. |
Updated the commit to check if |
We can talk about this at the PyCon sprints on Monday if you're going to be there. |
I'll be there on the 16 👀 |
] | ||
|
||
[tool.coverage.run] | ||
branch = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this, and formatting the file. Coverage may drop.
More fixes are needed... The |
I need to fix this PR, sorry. |
You know more about the edge cases than I do. I wish I could help more here, but you are welcome to modify the pull request as much as is needed |
This is an issue with uvloop. I've written an MRE on their side: MagicStack/uvloop#506 (comment) |
Since this is a uvloop issue, I'll be closing this. |
Please see the relevant "discussion"
#2311