You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the client from https://github.com/websocket-client/websocket-client, and tweaking it so that it send 100 big messages bigger then usual MTU of 1500 bytes, and disabling the SSL certificate check with "sslopt={"cert_reqs": ssl.CERT_NONE, "check_hostname": False}", than running the SimpleExampleServer.py with added debug print in SimpleEcho/handleMessage(), we can see that after awhile, it stop receiving the messages, therefore never echo the remaining ones, sometime only after 9-10 messages, sometimes after 30 or more, but never succeed to 100 messages.
This symptom doesn't seems to happen in Non-SSL.
And also, just to make sure it wasn't a bug of the websocket-client, this one as been tested with wss://echo.websocket.org/ several hundreds times, and didn't get any issue.
I'm not familiar with the low level websocket handshaking, so I didn't figured out where to add some traces to narrow the issue.
Could you provide some help ?
The text was updated successfully, but these errors were encountered:
This is a good pickup.
With an SSL socket the entire packet/record has to be read in a select environment. If you only do a partial read then select will not notify the application that data is left to be read. The simplest solution is to recv up to the max size of the SSL record which is 16k (16384). I will make that change.
I've tested it and works ok. I've checked in the change, let me know how you go.
Using the client from https://github.com/websocket-client/websocket-client, and tweaking it so that it send 100 big messages bigger then usual MTU of 1500 bytes, and disabling the SSL certificate check with "sslopt={"cert_reqs": ssl.CERT_NONE, "check_hostname": False}", than running the SimpleExampleServer.py with added debug print in SimpleEcho/handleMessage(), we can see that after awhile, it stop receiving the messages, therefore never echo the remaining ones, sometime only after 9-10 messages, sometimes after 30 or more, but never succeed to 100 messages.
This symptom doesn't seems to happen in Non-SSL.
And also, just to make sure it wasn't a bug of the websocket-client, this one as been tested with wss://echo.websocket.org/ several hundreds times, and didn't get any issue.
I'm not familiar with the low level websocket handshaking, so I didn't figured out where to add some traces to narrow the issue.
Could you provide some help ?
The text was updated successfully, but these errors were encountered: