Skip to content
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

Add ChatWebsocket example #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jagernicolas
Copy link

as discussed in #58

@jagernicolas
Copy link
Author

@IronsDu could you check why did the CI build failed. Looks like it's related to the test on windows OS. I don't see how that could be related to my modifications.

case WebSocketFormat::WebSocketFrameType::TEXT_FRAME:
// send back the message to each connected client
for (auto client : clients) {
lockClients.lock();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this lock is incorrectly

};

auto closedCallback = [&clients, &lockClients](const HttpSession::Ptr& httpSession) {
clients.remove(httpSession);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe need lock mutex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants