http.setConnectTimeout(500);, but it doesn’t seem to be of much use... Maybe using a "watchdog" that would exit the request after some time? But I’m not really sure how to do that...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.