-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
AsyncWebSocketClient forgets to dequeue control messages. Fills up with "pings" and prints "ERROR: Too many messages queued". #1389
Comments
After further investigation, it seems at some point If I keep receiving messages (and responding I've added this debug code to look into the state of the queue each time I ping
The result:
It seems the message at front of the queue is in an ill state, having acked for more than it was actually sent. |
EDIT: Already found the problem. Added a PR with the full description and solution #1390
I think it's an omission here
ESPAsyncWebServer/src/AsyncWebSocket.cpp
Line 527 in f71e3d4
I believe it should do the same cleanup as it does for message packets, also for control packets.
Or maybe the following
if
could be awhile
to flush all of them out.ESPAsyncWebServer/src/AsyncWebSocket.cpp
Line 498 in f71e3d4
My communication pattern is receiving human pressed keys which could be very fast and then very slow. Each key press gets a response sent. And the pings are more frequent and used to calculate round trip time. I start seeing problems when using pings/messages together and no problems at all if they are used separately (i.e. only pings, or only messages), regardless of the comm frequency. I'll keep investigating.
The text was updated successfully, but these errors were encountered: