-
Notifications
You must be signed in to change notification settings - Fork 19
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
Process all pending WS messages #3154
Conversation
let mut is_closing = false; | ||
|
||
// Looping over 'read_message' is merely a workaround for the unexpected behavior of mio event triggering. | ||
// Final solution will be applied in P-907. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will we still have a "final solution" ? Or we stop here for the moment?
What if we simply continue as long as We follow it by ws data frame processing as long as mio event is triggered, something like:
|
@Kailai-Wang we can do that, i've changed the code. That was my initial fix but:
|
As far as I can recall, there was problem with "more mio events but not data" vs "more data but no mio event". I can't recall the detail. That's the reason we had such fix in #2852, right ? |
We claimed at that time that mio events were missing. |
Keep on processing ws messages even if all data from tls stream was read.
Before we were reading all data from tls stream while processing only single message from websocket connection. If there was no data in stream then connection was closed, even if there were more than one message to be processed from ws connection.
Problematic flow: