Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

AsyncWebSocketClient forgets to dequeue control messages. Fills up with "pings" and prints "ERROR: Too many messages queued". #1389

Open
@2bam

Description

@2bam

EDIT: Already found the problem. Added a PR with the full description and solution #1390


I think it's an omission here

while(!_messageQueue.isEmpty() && _messageQueue.front()->finished()){

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.

if(!_controlQueue.isEmpty()){

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions