fix http timeout setting, dev.8

This commit is contained in:
MichaelDvP
2026-08-19 15:46:11 +02:00
parent 469ca8bf05
commit b05ae6dbbb
7 changed files with 27 additions and 23 deletions
+1 -1
View File
@@ -23,7 +23,7 @@
"standalone-devcontainer": "concurrently -c \"auto\" \"typesafe-i18n\" \"pnpm:mock-rest\" \"vite --host\""
},
"dependencies": {
"@alova/adapter-xhr": "2.3.1",
"@alova/adapter-xhr": "2.3.3",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@mui/icons-material": "^9.3.1",
+10 -15
View File
@@ -9,8 +9,8 @@ importers:
.:
dependencies:
'@alova/adapter-xhr':
specifier: 2.3.1
version: 2.3.1(alova@3.5.4)
specifier: 2.3.3
version: 2.3.3(alova@3.5.4)
'@emotion/react':
specifier: ^11.14.0
version: 11.14.0(@types/react@19.2.18)(react@19.2.8)(supports-color@10.2.2)
@@ -108,14 +108,11 @@ importers:
packages:
'@alova/adapter-xhr@2.3.1':
resolution: {integrity: sha512-mhViueeSJ6yfyEUvHIWyZlb6V8+9GJCzwU1hUsvjXSZHpkzGCeNUefxjjFC++K9UBsvUzJ5KGeyeqoToUQg3gg==}
'@alova/adapter-xhr@2.3.3':
resolution: {integrity: sha512-+ZtON7Gw/1bVsX3IXRaQ3g93CbO+OYfhDO6Q8IAiVTToBOaGX9NZTdziziEhHCFu5xlx4cVFVm7TJw+OT3H4GQ==}
peerDependencies:
alova: ^3.0.20
'@alova/shared@1.3.2':
resolution: {integrity: sha512-1XvDLWgYpVZ99MmLl1f3Fw4T6S6pPYk5afz5cwRVjuq8JXEGsDn9IygDKfvRyWqkqCBx7Jif07LIct1O+MVEow==}
'@alova/shared@1.3.4':
resolution: {integrity: sha512-kdYHUqO35AEdnQHnzevyf+VhhfD0jc+EBbZv/aYkA4rwjVjf+vB6D/ZkTwiYFH1yQjwiGwF1ZbJv5a7rKGyNiw==}
@@ -1097,8 +1094,8 @@ packages:
resolution: {integrity: sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==}
engines: {node: '>=18'}
default-browser@5.5.0:
resolution: {integrity: sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw==}
default-browser@5.5.1:
resolution: {integrity: sha512-m1pAzaJgZ/gssEqlOhJkPJp8Xly7QyW6xcrkUa2KKcDeDSEMP7X8xipU3snUcfisTQx0w1AGae+9UtJSfVnXGw==}
engines: {node: '>=18'}
define-data-property@1.1.4:
@@ -2990,13 +2987,11 @@ packages:
snapshots:
'@alova/adapter-xhr@2.3.1(alova@3.5.4)':
'@alova/adapter-xhr@2.3.3(alova@3.5.4)':
dependencies:
'@alova/shared': 1.3.2
'@alova/shared': 1.3.4
alova: 3.5.4
'@alova/shared@1.3.2': {}
'@alova/shared@1.3.4': {}
'@babel/code-frame@7.29.7':
@@ -4068,7 +4063,7 @@ snapshots:
default-browser-id@5.0.1: {}
default-browser@5.5.0:
default-browser@5.5.1:
dependencies:
bundle-name: 4.1.0
default-browser-id: 5.0.1
@@ -5143,7 +5138,7 @@ snapshots:
open@11.0.1:
dependencies:
default-browser: 5.5.0
default-browser: 5.5.1
define-lazy-prop: 3.0.0
is-in-ssh: 1.0.0
is-inside-container: 1.0.0
+11 -2
View File
@@ -184,7 +184,12 @@ bool MqttSettingsService::configureMqtt() {
static_cast<espMqttClientSecure *>(_mqttClient)->setKeepAlive(_state.keepAlive);
static_cast<espMqttClientSecure *>(_mqttClient)->setCleanSession(_state.cleanSession);
static_cast<espMqttClientSecure *>(_mqttClient)->setWill(will_topic, 1, true, "offline"); // QOS 1, retain
return _mqttClient->connect();
// return _mqttClient->connect();
if (_mqttClient->connect()) {
emsesp::EMSESP::logger().info("Starting MQTT service");
return true;
}
return false;
}
static_cast<espMqttClient *>(_mqttClient)->setServer(_state.host.c_str(), _state.port);
if (_state.username.length() > 0) {
@@ -194,7 +199,11 @@ bool MqttSettingsService::configureMqtt() {
static_cast<espMqttClient *>(_mqttClient)->setKeepAlive(_state.keepAlive);
static_cast<espMqttClient *>(_mqttClient)->setCleanSession(_state.cleanSession);
static_cast<espMqttClient *>(_mqttClient)->setWill(will_topic, 1, true, "offline"); // QOS 1, retain
return _mqttClient->connect();
// return _mqttClient->connect();
if (_mqttClient->connect()) {
emsesp::EMSESP::logger().info("Starting MQTT service");
return true;
}
}
return false;
+1 -1
View File
@@ -716,7 +716,7 @@ int http_request(std::string url, const std::string & method, const std::string
ssl_client->setSessionTimeout(120); // Set the timeout in seconds (>=120 seconds)
}
basic_client->setTimeout(5000); // socket-level read timeout
ssl_client->setTimeout(5000); // Stream::readBytes timeout used by Update
ssl_client->setTimeout(5); // Stream::readBytes timeout used by Update
ssl_client->setClient(basic_client, is_https); // enableSSL = false for plain HTTP
url.replace(0, is_https ? 8 : 7, "");
+2 -2
View File
@@ -162,7 +162,7 @@ bool System::command_sendmail(const char * value, const int8_t) {
ssl_client->setInsecure();
ssl_client->setBufferSizes(16384, 1024);
basic_client->setTimeout(5000); // socket-level read timeout
ssl_client->setTimeout(5000); // Stream::readBytes timeout used by Update
ssl_client->setTimeout(5); // Stream::readBytes timeout used by Update
r_client->addPort(port,
security == EMAIL_SECURITY::NONE ? readymail_protocol_plain_text
: security == EMAIL_SECURITY::SSL ? readymail_protocol_ssl
@@ -3110,7 +3110,7 @@ bool System::uploadFirmwareURL(const char * url) {
ssl_client.setSessionTimeout(120);
}
basic_client.setTimeout(15000); // socket-level read timeout
ssl_client.setTimeout(15000); // Stream::readBytes timeout used by Update
ssl_client.setTimeout(15); // Stream::readBytes timeout used by Update
ssl_client.setClient(&basic_client, is_https); // enableSSL = false for plain HTTP
const uint16_t port = is_https ? 443 : 80;
+1 -1
View File
@@ -1 +1 @@
#define EMSESP_APP_VERSION "3.9.0-dev.7"
#define EMSESP_APP_VERSION "3.9.0-dev.8"
+1 -1
View File
@@ -443,7 +443,7 @@ bool WebStatusService::refresh_versions_cache() {
ssl_client.setSessionTimeout(120);
}
basic_client.setTimeout(5000);
ssl_client.setTimeout(5000);
ssl_client.setTimeout(5);
ssl_client.setClient(&basic_client, is_https);
// split into host and path