From 4a914644679639066b4762e51394b58eb22592d3 Mon Sep 17 00:00:00 2001 From: Johny Mattsson Date: Sun, 29 Oct 2017 08:23:15 +1100 Subject: [PATCH] Fixed broken wifi.sta.{dis,}connect() with event mon enabled. (#2098) --- app/modules/wifi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/modules/wifi.c b/app/modules/wifi.c index 2970ef9a..9260b06b 100644 --- a/app/modules/wifi.c +++ b/app/modules/wifi.c @@ -979,6 +979,7 @@ static int wifi_station_connect4lua( lua_State* L ) if(lua_isfunction(L, 1)){ lua_pushnumber(L, EVENT_STAMODE_CONNECTED); lua_pushvalue(L, 1); + lua_remove(L, 1); wifi_event_monitor_register(L); } #endif @@ -993,6 +994,7 @@ static int wifi_station_disconnect4lua( lua_State* L ) if(lua_isfunction(L, 1)){ lua_pushnumber(L, EVENT_STAMODE_DISCONNECTED); lua_pushvalue(L, 1); + lua_remove(L, 1); wifi_event_monitor_register(L); } #endif