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:
parent
a35edca07a
commit
8ec93dcd26
@ -303,7 +303,7 @@ void ArduinoOTAClass::_runUpdate() {
|
|||||||
client.setNoDelay(true);
|
client.setNoDelay(true);
|
||||||
|
|
||||||
uint32_t written, total = 0;
|
uint32_t written, total = 0;
|
||||||
while (!Update.isFinished() && client.connected()) {
|
while (!Update.isFinished() && (client.connected() || client.available())) {
|
||||||
int waited = 1000;
|
int waited = 1000;
|
||||||
while (!client.available() && waited--)
|
while (!client.available() && waited--)
|
||||||
delay(1);
|
delay(1);
|
||||||
|
@ -319,7 +319,7 @@ void ESP8266WebServerTemplate<ServerType>::handleClient() {
|
|||||||
bool keepCurrentClient = false;
|
bool keepCurrentClient = false;
|
||||||
bool callYield = false;
|
bool callYield = false;
|
||||||
|
|
||||||
if (_currentClient.connected()) {
|
if (_currentClient.connected() || _currentClient.available()) {
|
||||||
switch (_currentStatus) {
|
switch (_currentStatus) {
|
||||||
case HC_NONE:
|
case HC_NONE:
|
||||||
// No-op to avoid C++ compiler warning
|
// No-op to avoid C++ compiler warning
|
||||||
|
Loading…
x
Reference in New Issue
Block a user