Commit 99930bef authored by Quxl's avatar Quxl
parents 4eaefa70 96840933
......@@ -76,6 +76,10 @@ public class HttpUtil {
if (requestUrl.startsWith("https")) {
((HttpsURLConnection) connection).setSSLSocketFactory(getDefaultSSLContext().getSocketFactory());
}
// 设置连接主机超时(30s)
connection.setConnectTimeout(30 * 1000);
// 设置从主机读取数据超时(3min)
connection.setReadTimeout(180 * 1000);
return connection;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment