mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-09-13 13:44:10 +00:00
fix http timeout setting, dev.8
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
@@ -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 @@
|
||||
#define EMSESP_APP_VERSION "3.9.0-dev.7"
|
||||
#define EMSESP_APP_VERSION "3.9.0-dev.8"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user