Skip to content

Websockets loop greatly slows down if a client WS lost due to Wifi dropout or change of SSID #922

Open
@computski

Description

@computski

I have a websocket server running on an ESP8266. SSID = "something" Clients connect to something-WiFi, invoke a webpage and a websocket is established behind this. If the client closes the web page whilst still conneted to SSID-something, all is well. Multiple clients can connect/ disconnect like this.

BUT, if a client is on SSID-something with an open webpage (and so an open websocket) and then either the WiFi drops out or the client navigates to a different SSID-someOther then, after a few seconds, the whole websocket loop on the ESP greatly slows down permanently. The only recovery is a reboot.

Is there an error event I should handle? is there a way to detect 'lost clients' like this and terminate them on the ESP?

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