1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-25 20:02:37 +03:00

webhook/http1.1: prevent from losing a new client while waiting (#7492)

This commit is contained in:
david gauchard 2020-07-30 01:26:56 +02:00 committed by GitHub
parent d5187790bd
commit 1041a9d752
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -366,7 +366,7 @@ void ESP8266WebServerTemplate<ServerType>::handleClient() {
break;
case HC_WAIT_CLOSE:
// Wait for client to close the connection
if (!_server.available() && (millis() - _statusChange <= HTTP_MAX_CLOSE_WAIT)) {
if (!_server.hasClient() && (millis() - _statusChange <= HTTP_MAX_CLOSE_WAIT)) {
keepCurrentClient = true;
callYield = true;
if (_currentClient.available())