Skip to content

Commit

Permalink
Add autoconnect deprecation warning to MQTT code
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelstoer committed Apr 4, 2017
1 parent 66ffa6c commit b645100
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/modules/mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b645100

Please sign in to comment.