We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a06b25 commit c644a2fCopy full SHA for c644a2f
src/Arduino_ESP32_OTA.cpp
@@ -80,7 +80,12 @@ Arduino_ESP32_OTA::Error Arduino_ESP32_OTA::begin()
80
/* initialize private variables */
81
_ota_size = 0;
82
_ota_header = {0};
83
-
+
84
+ if(Update.isRunning()) {
85
+ Update.abort();
86
+ DEBUG_DEBUG("%s: Aborting running update", __FUNCTION__);
87
+ }
88
89
if(!Update.begin(UPDATE_SIZE_UNKNOWN)) {
90
DEBUG_ERROR("%s: failed to initialize flash update", __FUNCTION__);
91
return Error::OtaStorageInit;
0 commit comments