Skip to content

Commit b949a6f

Browse files
committed
Guard websocket client against invalidation of TCP socket
Based on commit c9e4d42 of dumbfixes branch of 0xFEEDC0DE64 fork of ESPAsyncWebServer. When the socket gets disconnected, its corresponding AsyncClient is set to NULL. Several places in the code now have null pointer checks to prevent crashes. Message queue overflow is now an error that triggers socket disconnection. Limit of queued messages is now 16 for ESP32. Disconnected clients are no longer immediately removed from the client queue. Instead the cleanupClients() function prunes all of the disconnected clients. Some code formatting fixes.
1 parent 7a0d058 commit b949a6f

File tree

2 files changed

+148
-117
lines changed

2 files changed

+148
-117
lines changed

0 commit comments

Comments
 (0)