Skip to content

Commit

Permalink
fix(nan_console):removal of network interface unconditional initializ…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
entrop1a committed Oct 23, 2024
1 parent 83ec999 commit d8787d6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions examples/wifi/wifi_aware/nan_console/main/nan_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,10 @@ static int wifi_cmd_nan_disc(int argc, char **argv)
nan_cfg.warm_up_sec = nan_args.warmup_time->ival[0];
}

if(!g_nan_netif)
{
if(!g_nan_netif){
g_nan_netif = esp_netif_create_default_wifi_nan();
}

g_nan_netif = esp_netif_create_default_wifi_nan();
if ((esp_wifi_nan_start(&nan_cfg)) != ESP_OK) {
ESP_LOGI(TAG, "Failed to start NAN");
esp_netif_destroy_default_wifi(g_nan_netif);
Expand Down

0 comments on commit d8787d6

Please sign in to comment.