#419 修复抓取https链接线程无法结束导致进程一直运行的问题

master
yihua.huang 2016-12-18 06:56:01 +08:00
parent 1987cd3ae1
commit 8f942d6fe2
1 changed files with 2 additions and 1 deletions

View File

@ -91,8 +91,9 @@ public class HttpClientGenerator {
}
SocketConfig socketConfig = SocketConfig.custom().setSoKeepAlive(true).setTcpNoDelay(true).build();
SocketConfig socketConfig = SocketConfig.custom().setSoTimeout(site.getTimeOut()).setSoKeepAlive(true).setTcpNoDelay(true).build();
httpClientBuilder.setDefaultSocketConfig(socketConfig);
connectionManager.setDefaultSocketConfig(socketConfig);
if (site != null) {
httpClientBuilder.setRetryHandler(new DefaultHttpRequestRetryHandler(site.getRetryTimes(), true));
}