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

Incorrect order on incoming messages #50

Open
siavashg87 opened this issue Sep 12, 2019 · 1 comment
Open

Incorrect order on incoming messages #50

siavashg87 opened this issue Sep 12, 2019 · 1 comment

Comments

@siavashg87
Copy link

We are receiving multiple incoming messages to our websocket at the same millisecond, but they could be broadcasted in the wrong order to and from processIncomingMessage.

Is there any way to make sure these messages are received in the correct order as they are received?

@shizhx
Copy link

shizhx commented Sep 23, 2020

go m.processIncomingMessage(c, msg)

SHOULD NOT start new goroutine to process message, goroutine starting order not guaranteed.
SHOULD enqueue incoming message to a go-channel, and let only one goroutine dequeue messages and callback handler one by one.

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

No branches or pull requests

2 participants