Fix issue in webserver with Chrome based browsers

https://github.com/espressif/arduino-esp32/issues/3652
This commit is contained in:
Me No Dev 2020-11-15 08:46:23 +02:00 committed by GitHub
parent b6cc108d49
commit 378b6ac032
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -313,11 +313,12 @@ void WebServer::handleClient() {
_contentLength = CONTENT_LENGTH_NOT_SET; _contentLength = CONTENT_LENGTH_NOT_SET;
_handleRequest(); _handleRequest();
if (_currentClient.connected()) { // Fix for issue with Chrome based browsers: https://github.com/espressif/arduino-esp32/issues/3652
_currentStatus = HC_WAIT_CLOSE; // if (_currentClient.connected()) {
_statusChange = millis(); // _currentStatus = HC_WAIT_CLOSE;
keepCurrentClient = true; // _statusChange = millis();
} // keepCurrentClient = true;
// }
} }
} else { // !_currentClient.available() } else { // !_currentClient.available()
if (millis() - _statusChange <= HTTP_MAX_DATA_WAIT) { if (millis() - _statusChange <= HTTP_MAX_DATA_WAIT) {