esp_wifi_mesh: fix the device can not receive IP_EVENT_STA_GOT_IP when the router restarted

This commit is contained in:
shenjun 2021-12-08 22:05:41 +08:00
parent 9ee974e626
commit f646e7759d
2 changed files with 2 additions and 0 deletions

View File

@ -245,6 +245,7 @@ void mesh_event_handler(void *arg, esp_event_base_t event_base,
mesh_connected_indicator(mesh_layer);
is_mesh_connected = true;
if (esp_mesh_is_root()) {
esp_netif_dhcpc_stop(netif_sta);
esp_netif_dhcpc_start(netif_sta);
}
esp_mesh_comm_p2p_start();

View File

@ -213,6 +213,7 @@ void mesh_event_handler(void *arg, esp_event_base_t event_base,
last_layer = mesh_layer;
mesh_connected_indicator(mesh_layer);
if (esp_mesh_is_root()) {
esp_netif_dhcpc_stop(netif_sta);
esp_netif_dhcpc_start(netif_sta);
}
}