diff --git a/lib/libesp32/Berry-HttpClientLight/src/HttpClientLight.h b/lib/libesp32/Berry-HttpClientLight/src/HttpClientLight.h index 8c3709399..59f532d08 100644 --- a/lib/libesp32/Berry-HttpClientLight/src/HttpClientLight.h +++ b/lib/libesp32/Berry-HttpClientLight/src/HttpClientLight.h @@ -247,7 +247,7 @@ protected: /// request handling String _host; uint16_t _port = 0; - int32_t _connectTimeout = -1; + int32_t _connectTimeout = HTTPCLIENT_DEFAULT_TCP_TIMEOUT; // Do not set to -1 as it fails WiFiClient connect() bool _reuse = true; uint16_t _tcpTimeout = HTTPCLIENT_DEFAULT_TCP_TIMEOUT; bool _useHTTP10 = false; diff --git a/tasmota/tasmota_support/support_tasmota.ino b/tasmota/tasmota_support/support_tasmota.ino index 0c2c29779..845f18766 100644 --- a/tasmota/tasmota_support/support_tasmota.ino +++ b/tasmota/tasmota_support/support_tasmota.ino @@ -1403,7 +1403,6 @@ void Every250mSeconds(void) AddLog(LOG_LEVEL_INFO, "OTA: unsupported protocol"); ota_result = -999; } else { - OTAclient.setConnectTimeout(USE_BERRY_WEBCLIENT_TIMEOUT); httpUpdateLight.rebootOnUpdate(false); httpUpdateLight.setFactory(TasmotaGlobal.ota_factory); ota_result = (HTTP_UPDATE_FAILED != httpUpdateLight.update(OTAclient, version)); diff --git a/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino b/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino index b6233aa92..7c8300cb7 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino @@ -3265,7 +3265,6 @@ int WebQuery(char *buffer) { if (url && method) { #if defined(ESP32) && defined(USE_WEBCLIENT_HTTPS) if (http.begin(UrlEncode(url))) { - http.setConnectTimeout(USE_BERRY_WEBCLIENT_TIMEOUT); #else // HTTP only if (http.begin(http_client, UrlEncode(url))) { #endif @@ -3357,7 +3356,6 @@ int WebGetConfig(char *buffer) { #if defined(ESP32) && defined(USE_WEBCLIENT_HTTPS) HTTPClientLight http; if (http.begin(UrlEncode(url))) { // UrlEncode(url) = |http://192.168.178.86/cm?cmnd=POWER1%20ON| - http.setConnectTimeout(USE_BERRY_WEBCLIENT_TIMEOUT); #else // HTTP only WiFiClient http_client; HTTPClient http; @@ -3602,8 +3600,7 @@ void CmndWebQuery(void) } #ifdef USE_WEBGETCONFIG -void CmndWebGetConfig(void) -{ +void CmndWebGetConfig(void) { // WebGetConfig http://myserver:8000/tasmota/conf/%id%.dmp where %id% is expanded to device mac address // WebGetConfig http://myserver:8000/tasmota/conf/Config_demo_9.5.0.8.dmp if (XdrvMailbox.data_len > 0) {