Skip to content

Commit 1041a9d

Browse files
authored
webhook/http1.1: prevent from losing a new client while waiting (#7492)
1 parent d518779 commit 1041a9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ void ESP8266WebServerTemplate<ServerType>::handleClient() {
366366
break;
367367
case HC_WAIT_CLOSE:
368368
// Wait for client to close the connection
369-
if (!_server.available() && (millis() - _statusChange <= HTTP_MAX_CLOSE_WAIT)) {
369+
if (!_server.hasClient() && (millis() - _statusChange <= HTTP_MAX_CLOSE_WAIT)) {
370370
keepCurrentClient = true;
371371
callYield = true;
372372
if (_currentClient.available())

0 commit comments

Comments
 (0)