Commit 90bfc5ff authored by 张永's avatar 张永

1

parent 9a24080a
......@@ -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