Sfoglia il codice sorgente

Add autoconnect deprecation warning to MQTT code

Marcel Stör 7 anni fa
parent
commit
b645100d28
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      app/modules/mqtt.c

+ 3 - 0
app/modules/mqtt.c

@@ -1073,6 +1073,9 @@ static int mqtt_socket_connect( lua_State* L )
   if ( (stack<=top) && lua_isnumber(L, stack) )
   {
     auto_reconnect = lua_tointeger(L, stack);
+    if ( auto_reconnect == RECONNECT_POSSIBLE ) {
+      platform_print_deprecation_note("autoreconnect == 1 is deprecated", "in the next version");
+    }
     stack++;
     if ( auto_reconnect != RECONNECT_OFF && auto_reconnect != RECONNECT_POSSIBLE ){
       auto_reconnect = RECONNECT_OFF; // default to 0