File tree 2 files changed +4
-2
lines changed
HTTPUpdate/examples/httpUpdateSecure
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ void loop() {
96
96
client.setCACert (rootCACertificate);
97
97
98
98
// Reading data over SSL may be slow, use an adequate timeout
99
- client.setTimeout (12000 );
99
+ client.setTimeout (12000 / 1000 ); // timeout argument is defined in seconds for setTimeout
100
100
101
101
// The line below is optional. It can be used to blink the LED on the board during flashing
102
102
// The LED will be on during download of one buffer of data from the network. The LED will
Original file line number Diff line number Diff line change @@ -302,7 +302,9 @@ void WebServer::handleClient() {
302
302
// Wait for data from client to become available
303
303
if (_currentClient.available ()) {
304
304
if (_parseRequest (_currentClient)) {
305
- _currentClient.setTimeout (HTTP_MAX_SEND_WAIT);
305
+ // because HTTP_MAX_SEND_WAIT is expressed in milliseconds,
306
+ // it must be divided by 1000
307
+ _currentClient.setTimeout (HTTP_MAX_SEND_WAIT / 1000 );
306
308
_contentLength = CONTENT_LENGTH_NOT_SET;
307
309
_handleRequest ();
308
310
You can’t perform that action at this time.
0 commit comments