mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-10 18:24:27 +05:00
fix: increase keep alive timeout for mqtt #115
This commit is contained in:
@@ -120,7 +120,6 @@ protected:
|
||||
#endif
|
||||
|
||||
// client settings
|
||||
this->client->setKeepAliveInterval(15000);
|
||||
this->client->setTxPayloadSize(256);
|
||||
#ifdef ARDUINO_ARCH_ESP8266
|
||||
this->client->setConnectionTimeout(1000);
|
||||
@@ -199,6 +198,7 @@ protected:
|
||||
this->haHelper->updateCachedTopics();
|
||||
|
||||
this->client->stop();
|
||||
this->client->setKeepAliveInterval(settings.mqtt.interval * 10000);
|
||||
this->client->setId(networkSettings.hostname);
|
||||
this->client->setUsernamePassword(settings.mqtt.user, settings.mqtt.password);
|
||||
this->client->beginWill(this->haHelper->getDeviceTopic(F("status")).c_str(), 7, true, 1);
|
||||
|
||||
Reference in New Issue
Block a user