I had the settings for the wlan set to never disconnect. The first time I noticed it was during normal browsing, and later whilst I was chatting on IRC. I noticed that is I was chatting continuously it didn't disconnect, which gave me the idea to use ping.