Skip to content

Commit 1c3384c

Browse files
authored
Fix for timeout issues on WebServer (espressif#8319)
1 parent 18164e6 commit 1c3384c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: libraries/WebServer/src/WebServer.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -285,17 +285,16 @@ void WebServer::serveStatic(const char* uri, FS& fs, const char* path, const cha
285285

286286
void WebServer::handleClient() {
287287
if (_currentStatus == HC_NONE) {
288-
WiFiClient client = _server.available();
289-
if (!client) {
288+
_currentClient = _server.available();
289+
if (!_currentClient) {
290290
if (_nullDelay) {
291291
delay(1);
292292
}
293293
return;
294294
}
295295

296-
log_v("New client: client.localIP()=%s", client.localIP().toString().c_str());
296+
log_v("New client: client.localIP()=%s", _currentClient.localIP().toString().c_str());
297297

298-
_currentClient = client;
299298
_currentStatus = HC_WAIT_READ;
300299
_statusChange = millis();
301300
}

0 commit comments

Comments
 (0)