提交 cabe8987 编写于 作者: K Kohsuke Kawaguchi

set a very conservative time out to avoid a hang

上级 a6520d81
......@@ -308,7 +308,9 @@ public class JDKInstaller extends ToolInstaller {
IOUtils.copy(new RetryableHttpStream(src) {
@Override
protected HttpURLConnection connect() throws IOException {
return (HttpURLConnection) ProxyConfiguration.open(url);
HttpURLConnection con = (HttpURLConnection) ProxyConfiguration.open(url);
con.setReadTimeout(60*1000); // don't block forever, but don't let the slow client fail with false positives either
return con;
}
}, out);
} finally {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册