this runs on gui-thread only, I believe, and if any other thread accesses smb or mysql shortly after resume they will not get any help by this wait