diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 1a3fe24c9..10287d4ef 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -887,8 +887,10 @@ void wpa_supplicant_update_scan_int(struct wpa_supplicant *wpa_s, int sec) new_int.usec = remaining.usec; } - eloop_register_timeout(new_int.sec, new_int.usec, wpa_supplicant_scan, - wpa_s, NULL); + if (cancelled) { + eloop_register_timeout(new_int.sec, new_int.usec, + wpa_supplicant_scan, wpa_s, NULL); + } wpa_s->scan_interval = sec; }