We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fda21f3 commit 0c0bd86Copy full SHA for 0c0bd86
libraries/ArduinoOTA/src/ArduinoOTA.cpp
@@ -315,6 +315,10 @@ void ArduinoOTAClass::_runUpdate() {
315
size_t r = client.read(buf, available);
316
if(r != available){
317
log_w("didn't read enough! %u != %u", r, available);
318
+ if((int32_t) r<0) {
319
+ delay(1);
320
+ continue; //let's not try to write 4 gigabytes when client.read returns -1
321
+ }
322
}
323
324
written = Update.write(buf, r);
0 commit comments