Browse Source

MQTT re-connect issue (#2256)

Fix to start sending PINGREQ after a reconnect.
Frank Exoo 6 years ago
parent
commit
ba36cb3d2d
1 changed files with 1 additions and 0 deletions
  1. 1 0
      app/modules/mqtt.c

+ 1 - 0
app/modules/mqtt.c

@@ -337,6 +337,7 @@ READPACKET:
       } else {
         mud->connState = MQTT_DATA;
         NODE_DBG("MQTT: Connected\r\n");
+        mud->keepalive_sent = 0;
         if (mud->mqtt_state.auto_reconnect == RECONNECT_POSSIBLE) {
           mud->mqtt_state.auto_reconnect = RECONNECT_ON;
         }