From a6fbe48779fd0ce2c75652a611cc11a6003fc52e Mon Sep 17 00:00:00 2001 From: Shreyas Sheth Date: Fri, 8 May 2026 13:14:21 +0530 Subject: [PATCH] fix(wpa_supplicant): alter the check for eloop_is_running before wifi_task assertion --- components/wpa_supplicant/port/eloop.c | 6 +++--- components/wpa_supplicant/test_apps/main/test_eloop.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/wpa_supplicant/port/eloop.c b/components/wpa_supplicant/port/eloop.c index 1e81dc2ae0f..206a37c38c9 100644 --- a/components/wpa_supplicant/port/eloop.c +++ b/components/wpa_supplicant/port/eloop.c @@ -510,12 +510,12 @@ int eloop_register_timeout_blocking(eloop_blocking_timeout_handler handler, #endif int ret; - if (current_task_is_wifi_task()) { - assert(false); + if (!eloop_is_running()) { return -1; } - if (!eloop_is_running()) { + if (current_task_is_wifi_task()) { + assert(false); return -1; } diff --git a/components/wpa_supplicant/test_apps/main/test_eloop.c b/components/wpa_supplicant/test_apps/main/test_eloop.c index bd68e804f46..6e5cec7811e 100644 --- a/components/wpa_supplicant/test_apps/main/test_eloop.c +++ b/components/wpa_supplicant/test_apps/main/test_eloop.c @@ -239,7 +239,7 @@ TEST_CASE("Test eloop timers run", "[eloop]") int fired_before_stop; eloop_test_reset_hooks(); - set_leak_threshold(1000); + set_leak_threshold(1200); eloop_test_wifi_start(); eloop_test_wifi_stop(); /* Reset memory stats since some is leaked during the first initialization */