From d7da14d69ece5b02d9112597a5fbcb5afa12ffb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnim=20L=C3=A4uger?= Date: Thu, 14 Feb 2019 23:32:16 +0100 Subject: [PATCH] MQTT: print deprecation message regardless of autoreconnect value (#2668) --- app/modules/mqtt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/modules/mqtt.c b/app/modules/mqtt.c index 7ab49146..5e959613 100644 --- a/app/modules/mqtt.c +++ b/app/modules/mqtt.c @@ -1328,10 +1328,8 @@ static int mqtt_socket_connect( lua_State* L ) if ( (stack<=top) && lua_isnumber(L, stack) ) { + platform_print_deprecation_note("autoreconnect is deprecated", "in the next version"); 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