-
Notifications
You must be signed in to change notification settings - Fork 81
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
go_ws/server.go #9
Comments
尝试修复了 |
你这个明显不对,消息不能用全局变量存,不然并发上去肯定会出错. |
你不应该使用全局的变量,应该使用局部变量,然后通过方法传递.或者使用结构体方法的方式 |
ok 谢谢指出 有空我再验证一下 |
server.go 不应该 使用
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
read方法里面修改全局变量clientMsg,难道不会有并发问题?
The text was updated successfully, but these errors were encountered: