diff -Naur old/ESP8266httpUpdate.cpp src/ESP8266httpUpdate.cpp --- old/ESP8266httpUpdate.cpp 2018-03-08 05:19:25.000000000 +0100 +++ src/ESP8266httpUpdate.cpp 2018-07-14 10:43:44.581947667 +0200 @@ -249,10 +249,13 @@ WiFiClient * tcp = http.getStreamPtr(); - WiFiUDP::stopAll(); - WiFiClient::stopAllExcept(tcp); + // https://github.com/esp8266/Arduino/issues/3359 + if(_severConnectionsOnUpdate) { + WiFiUDP::stopAll(); + WiFiClient::stopAllExcept(tcp); - delay(100); + delay(100); + } int command; diff -Naur old/ESP8266httpUpdate.h src/ESP8266httpUpdate.h --- old/ESP8266httpUpdate.h 2018-03-08 05:19:25.000000000 +0100 +++ src/ESP8266httpUpdate.h 2018-07-14 10:38:51.035901594 +0200 @@ -71,6 +71,11 @@ _rebootOnUpdate = reboot; } + void severConnectionsOnUpdate(bool sever) + { + _severConnectionsOnUpdate = sever; + } + // This function is deprecated, use rebootOnUpdate and the next one instead t_httpUpdate_return update(const String& url, const String& currentVersion, const String& httpsFingerprint, bool reboot) __attribute__((deprecated)); @@ -103,6 +108,7 @@ int _lastError; bool _rebootOnUpdate = true; + bool _severConnectionsOnUpdate = true; }; #if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_HTTPUPDATE)