Skip to content

Commit 950e9c9

Browse files
author
Me No Dev
committed
Let the socket to properly close
python was keeping the connection open and sending duplicate FINs until the ESP came back online, because the ESP was resetting without giving the network a chance to answer and close
1 parent d3628f5 commit 950e9c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libraries/ArduinoOTA/ArduinoOTA.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ void ArduinoOTAClass::_runUpdate(){
144144

145145
if(Update.end()){
146146
client.print("OK");
147+
client.stop();
148+
delay(10);
147149
#if OTA_DEBUG
148150
Serial.printf("Update Success\nRebooting...\n");
149151
#endif

0 commit comments

Comments
 (0)