Browse Source

only lock async client

sensors
Maxim Prokhorov 5 years ago
parent
commit
38216bc61a
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      code/espurna/mqtt.ino

+ 1
- 2
code/espurna/mqtt.ino View File

@ -76,8 +76,6 @@ void _mqttConnect() {
// Check reconnect interval
if (millis() - _mqtt_last_connection < _mqtt_reconnect_delay) return;
_mqtt_connecting = true;
// Increase the reconnect delay
_mqtt_reconnect_delay += MQTT_RECONNECT_DELAY_STEP;
if (_mqtt_reconnect_delay > MQTT_RECONNECT_DELAY_MAX) {
@ -109,6 +107,7 @@ void _mqttConnect() {
DEBUG_MSG_P(PSTR("[MQTT] Connecting to broker at %s:%d\n"), host, port);
#if MQTT_USE_ASYNC
_mqtt_connecting = true;
_mqtt.setServer(host, port);
_mqtt.setClientId(_mqtt_clientid);


Loading…
Cancel
Save