Skip to content

Commit 25064c5

Browse files
author
ben
committed
修正me.chanjar.weixin.common.util.http.DefaultApacheHttpClientBuilder#prepare调用问题,try to fix#52
1 parent 815ea18 commit 25064c5

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ public boolean retryRequest(IOException exception, int executionCount, HttpConte
5858

5959
private HttpClientBuilder httpClientBuilder;
6060

61-
private boolean prepared = false;
62-
6361
private DefaultApacheHttpClientBuilder() {
62+
prepare();
6463
}
6564

6665
public static DefaultApacheHttpClientBuilder get() {
@@ -153,11 +152,6 @@ private void prepare() {
153152

154153
@Override
155154
public CloseableHttpClient build() {
156-
if (!this.prepared) {
157-
prepare();
158-
this.prepared = true;
159-
}
160-
161155
return this.httpClientBuilder.build();
162156
}
163157

0 commit comments

Comments
 (0)