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
[BUG] WebSocket send/receive intermittently throwing SSL error on SelectorEventLoopPolicy #203
Comments
It seems that we should check the return code when using Regardless of that, the asyncio implementation is not elegant at all, I wish there were APIs integrating See my question here: curl/curl#11867 |
Would this be in the Python implementation? I was going to PR a fix using regex but I was hoping there was a more low-level place to do it.
Yeah it's unfortunate. This is definitely a lot better than nothing though, since Cloudflare does provide a JA3 fingerprint for WebSocket traffic for enterprise customers :( |
It's here: Lines 362 to 367 in aefc247
Does it work for Cloudflare? |
Some also reported that not only websockets returned the same error: |
That's error 10053, not 10035 :) According to MS docs, that's |
Yeah that's where I was looking, but I didn't think it'd be very clean since the error is wrapped and all we have is the string
Other than these minor issues, it seems to be working perfectly. Though it probably isn't as performant as aiohttp due to the libcurl API issues you mentioned. |
Unfortunately, I'm now able to reproduce this with the proactor event loop as well :( |
You have sharp eyes 😄 |
Describe the bug
Seemingly randomly, when sending or receiving from a WebSocket, I'll get an error with the reason
BoringSSL SSL_read: Call would block, errno 10035
.Both of the following tracebacks are observed:
and (more commonly):
To Reproduce
Expected behavior
According to Microsoft docs, error 10035 is nonfatal and should simply be retried (I think?). I would do this at the application level, but this error is wrapped by curl into its own error so I can't just check the error number.
Versions
Additional context
I'm using the async session with the selector event loop policy. I cannot reproduce this with the proactor event loop policy, despite the warnings.
The text was updated successfully, but these errors were encountered: