How to keep Yun connected to WIFI

I've done some tests in order to see if the yun automatically reconnect to the network and It does. I configured my Yun to connect to an access point, and if I turn off the AP and then turn on again, the Yun recover the connection. I waited 5 minutes and 2 hours before turning on the AP and I tried with WPA2 and with no encryption. I have the latest version of the firmware on my Yun.