AsyncWebSocketClient forgets to dequeue control messages. Fills up with "pings" and prints "ERROR: Too many messages queued". #1389
Description
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 a while
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.