Skip to content

Commit 8ec93dc

Browse files
d-a-vdevyte
authored andcommitted
use wificlient.available() where relevant (#6827)
1 parent a35edca commit 8ec93dc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libraries/ArduinoOTA/ArduinoOTA.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ void ArduinoOTAClass::_runUpdate() {
303303
client.setNoDelay(true);
304304

305305
uint32_t written, total = 0;
306-
while (!Update.isFinished() && client.connected()) {
306+
while (!Update.isFinished() && (client.connected() || client.available())) {
307307
int waited = 1000;
308308
while (!client.available() && waited--)
309309
delay(1);

libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ void ESP8266WebServerTemplate<ServerType>::handleClient() {
319319
bool keepCurrentClient = false;
320320
bool callYield = false;
321321

322-
if (_currentClient.connected()) {
322+
if (_currentClient.connected() || _currentClient.available()) {
323323
switch (_currentStatus) {
324324
case HC_NONE:
325325
// No-op to avoid C++ compiler warning

0 commit comments

Comments
 (0)