Fix Timeout Bug in WebServer (#2938)

This commit is contained in:
Victor Aprea
2019-07-09 12:27:24 -04:00
committed by Me No Dev
parent d2816b2f32
commit 02e51728c4
2 changed files with 4 additions and 2 deletions

View File

@ -302,7 +302,9 @@ void WebServer::handleClient() {
// Wait for data from client to become available
if (_currentClient.available()) {
if (_parseRequest(_currentClient)) {
_currentClient.setTimeout(HTTP_MAX_SEND_WAIT);
// 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();