Skip to content

Commit a6d29d9

Browse files
committed
添加DNS解析器支持 (binarywang#171) fix
1 parent b2c4160 commit a6d29d9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

weixin-java-common/src/main/java/me/chanjar/weixin/common/util/http/apache/ApacheHttpDnsClientBuilder.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package me.chanjar.weixin.common.util.http;
1+
package me.chanjar.weixin.common.util.http.apache;
22

33
import org.apache.commons.lang3.StringUtils;
44
import org.apache.http.annotation.NotThreadSafe;
@@ -30,7 +30,7 @@
3030

3131
/**
3232
* httpclient 连接管理器 自带DNS解析
33-
*
33+
*
3434
* 大部分代码拷贝自:DefaultApacheHttpClientBuilder
3535
*
3636
* @author Andy.Huo
@@ -62,7 +62,7 @@ public boolean retryRequest(IOException exception, int executionCount, HttpConte
6262
private int httpProxyPort;
6363
private String httpProxyUsername;
6464
private String httpProxyPassword;
65-
65+
6666
/**
6767
* 闲置连接监控线程
6868
*/
@@ -207,7 +207,7 @@ private synchronized void prepare() {
207207
Registry<ConnectionSocketFactory> registry = RegistryBuilder.<ConnectionSocketFactory>create()
208208
.register("http", this.plainConnectionSocketFactory).register("https", this.sslConnectionSocketFactory)
209209
.build();
210-
210+
211211
@SuppressWarnings("resource")
212212
PoolingHttpClientConnectionManager connectionManager;
213213
if(dnsResover != null){
@@ -221,7 +221,7 @@ private synchronized void prepare() {
221221
}
222222
connectionManager = new PoolingHttpClientConnectionManager(registry);
223223
}
224-
224+
225225
connectionManager.setMaxTotal(this.maxTotalConn);
226226
connectionManager.setDefaultMaxPerRoute(this.maxConnPerHost);
227227
connectionManager

0 commit comments

Comments
 (0)