Wpa-supplicant, scanning too aggressive

Hi,

I have a problem with wpa_supplicant, when I activate a network with a ssid that does not exist (or is out of range) wpa_supplicant starts scanning continuously. This behavior is problematic for me.

From the documentation, by setting the configuration autoscan to exponential:3:300, in theory, should start scanning fast and then slow down to a scan every 5 minutes; but that doesn't happen, it keeps scanning continuously.
I even tried to set it to periodic:30 and this setting keep being ignored.
I verified with the command "dump"(via wpa_cli) that the setting is present and correct.

as a bit of background: I'm writing a daemon that interfaces via the ctrl_interface (not dbus) to wpa_supplicant to programmatically connect to a certain ap based on some configuration, I follow the official documentation here.

Currently, i'm using wpad-openssl version 2.7-devel, on openwrt 18.06. The same problem happens also on wpad-mini.