Dark AI
Dark AI
DIIDevHeads IoT Integration Server
Created by Camila_99$$ on 8/30/2024 in #edge-networking
How to Force HTTP Requests to Timeout on ESP32 When Router Freezes?
Hi @Camila_99$$ in other to avoid freezes during HTTP requests, set both a connection timeout (http.setConnectTimeout(500);) and a response timeout (http.setTimeout(1000);). This will make sure the request stops if it doesn't finish within the given time. For even better performance, you might want to use asynchronous requests with ESPAsyncHTTPClient to keep your main loop running smoothly.
4 replies