Skip to content

Commit

Permalink
Backport timeout fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Jul 12, 2024
1 parent d8249a6 commit c49794f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libraries/WebServer/src/WebServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,10 @@ void WebServer::handleClient() {
case HC_WAIT_READ:
// Wait for data from client to become available
if (_currentClient.available()) {
// because HTTP_MAX_SEND_WAIT is expressed in milliseconds,
// it must be divided by 1000
currentClient.setTimeout(HTTP_MAX_SEND_WAIT / 1000);
if (_parseRequest(_currentClient)) {
// because HTTP_MAX_SEND_WAIT is expressed in milliseconds,
// it must be divided by 1000
_currentClient.setTimeout(HTTP_MAX_SEND_WAIT / 1000);
_contentLength = CONTENT_LENGTH_NOT_SET;
_handleRequest();

Expand Down

0 comments on commit c49794f

Please sign in to comment.