I have 4x WS client instances (arduinoWebSockets.h) & 1 WS server instance (ESPAsyncWebServer.h) running on an ESP32. If any of the servers go offline and are uncontactable, evaluating and attempting to reconnect with the following causes major processing blocks :
if(!client1.available()){
client1 = WebsocketsClient();
client1.onMessage(onMessageCallback1);
client1.onEvent(onEventsCallback1);
client1.connect(websockets1_server_host, websockets_server_port, "/ws");
}
With the server offline or uncontactable, this causes a significant block with each loop iteration. If I have a watchdog on, it triggers a reset.
I have 4x WS client instances (arduinoWebSockets.h) & 1 WS server instance (ESPAsyncWebServer.h) running on an ESP32. If any of the servers go offline and are uncontactable, evaluating and attempting to reconnect with the following causes major processing blocks :
if(!client1.available()){
client1 = WebsocketsClient();
client1.onMessage(onMessageCallback1);
client1.onEvent(onEventsCallback1);
client1.connect(websockets1_server_host, websockets_server_port, "/ws");
}
With the server offline or uncontactable, this causes a significant block with each loop iteration. If I have a watchdog on, it triggers a reset.