1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-06 05:21:22 +03:00

use wificlient.available() where relevant (#6827)

This commit is contained in:
david gauchard 2019-11-24 00:12:37 +01:00 committed by Develo
parent a35edca07a
commit 8ec93dcd26
2 changed files with 2 additions and 2 deletions

View File

@ -303,7 +303,7 @@ void ArduinoOTAClass::_runUpdate() {
client.setNoDelay(true);
uint32_t written, total = 0;
while (!Update.isFinished() && client.connected()) {
while (!Update.isFinished() && (client.connected() || client.available())) {
int waited = 1000;
while (!client.available() && waited--)
delay(1);

View File

@ -319,7 +319,7 @@ void ESP8266WebServerTemplate<ServerType>::handleClient() {
bool keepCurrentClient = false;
bool callYield = false;
if (_currentClient.connected()) {
if (_currentClient.connected() || _currentClient.available()) {
switch (_currentStatus) {
case HC_NONE:
// No-op to avoid C++ compiler warning