Skip to content

Commit 25110a5

Browse files
committed
fixed disconnect not showing in the webapp
1 parent cfdd13a commit 25110a5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/wifi_manager.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,16 +1062,17 @@ void wifi_manager( void * pvParameters ){
10621062
/* user manually requested a disconnect so the lost connection is a normal event. Clear the flag and restart the AP */
10631063
xEventGroupClearBits(wifi_manager_event_group, WIFI_MANAGER_REQUEST_DISCONNECT_BIT);
10641064

1065-
if(wifi_manager_lock_json_buffer( portMAX_DELAY )){
1066-
wifi_manager_generate_ip_info_json( UPDATE_USER_DISCONNECT );
1067-
wifi_manager_unlock_json_buffer();
1068-
}
1069-
10701065
/* erase configuration */
10711066
if(wifi_manager_config_sta){
10721067
memset(wifi_manager_config_sta, 0x00, sizeof(wifi_config_t));
10731068
}
10741069

1070+
/* regenerate json status */
1071+
if(wifi_manager_lock_json_buffer( portMAX_DELAY )){
1072+
wifi_manager_generate_ip_info_json( UPDATE_USER_DISCONNECT );
1073+
wifi_manager_unlock_json_buffer();
1074+
}
1075+
10751076
/* save NVS memory */
10761077
wifi_manager_save_sta_config();
10771078

0 commit comments

Comments
 (0)