Server connection dropouts

Try adapting this for ESP32 and see it it works for you…