While using the WIFI, the phone blacks out for a while, and the connection is broken.

Turn off the phone's WIFI and turn it back on.