SocketTimeoutException in HttpURLConnection randomly in getResponseCode
问题 I am getting following error in con.getResponseCode() java.net.SocketTimeoutException: failed to connect to example.com (port 80) after 3000ms at libcore.io.IoBridge.connectErrno(IoBridge.java:223) at libcore.io.IoBridge.connect(IoBridge.java:127) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:475) at java.net.Socket.connect(Socket.java:861) at com.android.okhttp.internal.Platform.connectSocket(Platform.java:152) at com