From 1f3690b2d2da61b431f92c24e76d22b5cf92f6f1 Mon Sep 17 00:00:00 2001 From: david gauchard Date: Sun, 12 Jun 2022 19:06:27 +0200 Subject: [PATCH 1/2] do not call tcp/udp ::stopAll() when it is not required to to so --- .../ESP8266HTTPUpdateServer/src/ESP8266HTTPUpdateServer-impl.h | 1 - libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/libraries/ESP8266HTTPUpdateServer/src/ESP8266HTTPUpdateServer-impl.h b/libraries/ESP8266HTTPUpdateServer/src/ESP8266HTTPUpdateServer-impl.h index 49bb87f28c..f40b5928fd 100644 --- a/libraries/ESP8266HTTPUpdateServer/src/ESP8266HTTPUpdateServer-impl.h +++ b/libraries/ESP8266HTTPUpdateServer/src/ESP8266HTTPUpdateServer-impl.h @@ -89,7 +89,6 @@ void ESP8266HTTPUpdateServerTemplate::setup(ESP8266WebServerTemplate return; } - WiFiUDP::stopAll(); if (_serial_output) Serial.printf("Update: %s\n", upload.filename.c_str()); if (upload.name == "filesystem") { diff --git a/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp b/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp index 4d3d5fae82..bf96eb376d 100644 --- a/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp +++ b/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp @@ -224,7 +224,6 @@ void ESP8266WiFiGenericClass::_eventCallback(void* arg) if(event->event == EVENT_STAMODE_DISCONNECTED) { DEBUG_WIFI("STA disconnect: %d\n", event->event_info.disconnected.reason); - WiFiClient::stopAll(); } if (event->event == EVENT_STAMODE_AUTHMODE_CHANGE) { From ac9486728484b01a3f5e47990c7af8ef9f2de796 Mon Sep 17 00:00:00 2001 From: David Gauchard Date: Thu, 23 Jun 2022 14:36:20 +0200 Subject: [PATCH 2/2] remove stopAll also from ArduinoOTA --- libraries/ArduinoOTA/ArduinoOTA.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/libraries/ArduinoOTA/ArduinoOTA.cpp b/libraries/ArduinoOTA/ArduinoOTA.cpp index 025c10d2be..109bbb4959 100644 --- a/libraries/ArduinoOTA/ArduinoOTA.cpp +++ b/libraries/ArduinoOTA/ArduinoOTA.cpp @@ -265,8 +265,6 @@ void ArduinoOTAClass::_runUpdate() { delay(100); Update.setMD5(_md5.c_str()); - WiFiUDP::stopAll(); - WiFiClient::stopAll(); if (_start_callback) { _start_callback();