You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
client.setTimeout(12000 / 1000); // timeout argument is defined in seconds for setTimeout
Here it is using setTimeout on a WiFiClientSecure because "Reading data over SSL may be slow, use an adequate timeout". But in reality it does just nothing...
The HTTPClient code also uses the setTimeout function, but it ignores if the WiFiClient passed is a WiFiClient object or a WiFiClientSecure object (thus, setting the timeout incorrectly on the second case).
Shouldn't both method do the "same"? (not the same as "the same code" but as the "same spirit"). I guess the setTimeout method in WiFiClientSecure should call some mbedtls funcion to set the timeout? This is just a guess, that part of the core kind of exceeds my knowledge.
Sketch
No sketch
Debug Message
No message.
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
I confirm I have checked existing issues, online documentation and Troubleshooting guide.
The text was updated successfully, but these errors were encountered:
Board
ESP32 Dev Module
Device Description
ESP32 Dev Module
Hardware Configuration
ESP32 Dev Module
Version
latest master
IDE Name
PlatformIO
Operating System
Windows 10
Flash frequency
40Mhz
PSRAM enabled
no
Upload speed
115200
Description
This is not a bug per se, but an inconsistency I have noticed.
WiFiClientSecure::setTimeout() does nothing.
arduino-esp32/libraries/WiFiClientSecure/src/WiFiClientSecure.h
Line 82 in ba8024c
but WiFiClient::setTimeout() actually sets the timeout.
arduino-esp32/libraries/WiFi/src/WiFiClient.cpp
Line 302 in ba8024c
Also, this inconsistency extends to other parts of the core. For example this:
arduino-esp32/libraries/HTTPUpdate/examples/httpUpdateSecure/httpUpdateSecure.ino
Line 99 in ba8024c
Here it is using setTimeout on a WiFiClientSecure because "Reading data over SSL may be slow, use an adequate timeout". But in reality it does just nothing...
The HTTPClient code also uses the setTimeout function, but it ignores if the WiFiClient passed is a WiFiClient object or a WiFiClientSecure object (thus, setting the timeout incorrectly on the second case).
arduino-esp32/libraries/HTTPClient/src/HTTPClient.cpp
Line 1154 in ba8024c
arduino-esp32/libraries/HTTPClient/src/HTTPClient.cpp
Line 498 in ba8024c
Shouldn't both method do the "same"? (not the same as "the same code" but as the "same spirit"). I guess the setTimeout method in WiFiClientSecure should call some mbedtls funcion to set the timeout? This is just a guess, that part of the core kind of exceeds my knowledge.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: