-
Notifications
You must be signed in to change notification settings - Fork 378
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
Is WriteServerMessage thread-safe? #176
Comments
No, it's not thread safe. |
@cristaloleg is there any function supporting writing message to a connection concurrently? |
Just access it with |
@cristaloleg How about ws package? |
What exactly? |
@cristaloleg is ws write methods thread safe? |
Sorry, missed your response. Depends on the param, functions themself are thread-safe, params might not be. |
hi @cristaloleg , is it thread-safe between I guess |
These are just funcs, they depend only on the given params. If a passed
I don't see any write-specific call in it. Can you clarify why you think it writes pong messages? |
I have experienced the "Invalid frame header" and "One or more reserved bits are on: reserved1 = 0, reserved2 = 1, reserved3 = 0" when calling WriteServerMessage concurrently from multiple goroutines.
The text was updated successfully, but these errors were encountered: