The Problem of http and socket Request Timeout in android

  android, question

Android phones, the network is very normal.
It is normal for a browser to open a network. Some third-party services in inside, such as QQ, Sina Weibo and other authorized networks, can be accessed normally.
But as soon as I got to my code, I basically timed out.
Both httpurlconnection.getinputstream or socket.getinputstream timed out, SocketTimeoutException

There is really no solution. . .

It is not certain that this problem will happen. It is impossible to say for sure. I really don’t understand which convulsion happened.

Generally encountered this kind of problem after a while, or turn off WIFI and then on.

WIFI problem? But other applications are normal.
The problem with your own server? But they always say why the iphone is good. . .

This problem has troubled me for n long and n long. . .
The great gods of Kneel to beg.

Do you use a magic horse to make http requests, HttpURLConnection? httpClient? Is the overtime set too short?