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
func (u *User) SendMessage(ctx context.Context) { for msg := range u.MessageChannel { wsjson.Write(ctx, u.conn, msg) } }
你这样的话,MessageChannel close了的话,这里不是一直循环
The text was updated successfully, but these errors were encountered:
close 之后 就退出了,还循环个啥。
Sorry, something went wrong.
close channel后 for range 会自动退出的
No branches or pull requests
你这样的话,MessageChannel close了的话,这里不是一直循环
The text was updated successfully, but these errors were encountered: