We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I'm using flask_sock (cc @miguelgrinberg) which uses simple-websocket, which uses this project, and we found some flakeyness in our CI for Solara.
About 1 in 5 runs on CI and 1 in 50 runs on our local machines gave corrupt websocket messages, which triggered errors in json parsing.
I believe the reason is because FrameProtocol is not thread safe due to _outbound_opcode. See
FrameProtocol
_outbound_opcode
I'm not sure if this should be documented or if this can be fixed. The workaround for us now is to put a mutex around the send and close calls:
Do you think this is sufficient? We only call receive from the same thread, but send will only also be called from other threads.
I would love to get your opinions on this.
Regards,
Maarten
The text was updated successfully, but these errors were encountered:
Yes, a mutex is one possible option. Happy to review and merge a PR to mention it in the docs.
Sorry, something went wrong.
No branches or pull requests
Hi,
I'm using flask_sock (cc @miguelgrinberg) which uses simple-websocket, which uses this project, and we found some flakeyness in our CI for Solara.
About 1 in 5 runs on CI and 1 in 50 runs on our local machines gave corrupt websocket messages, which triggered errors in json parsing.
I believe the reason is because
FrameProtocol
is not thread safe due to_outbound_opcode
. SeeI'm not sure if this should be documented or if this can be fixed. The workaround for us now is to put a mutex around the send and close calls:
Do you think this is sufficient? We only call receive from the same thread, but send will only also be called from other threads.
I would love to get your opinions on this.
Regards,
Maarten
The text was updated successfully, but these errors were encountered: