Skip to content

Commit 510cad2

Browse files
authored
Merge pull request #60 from kakotor/develop
try to fix #58
2 parents 3d9bc6b + ab9cc45 commit 510cad2

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
@@ -60,9 +60,8 @@ public boolean retryRequest(IOException exception, int executionCount, HttpConte
6060

6161
private HttpClientBuilder httpClientBuilder;
6262

63-
private boolean prepared = false;
64-
6563
private DefaultApacheHttpClientBuilder() {
64+
prepare();
6665
}
6766

6867
public static DefaultApacheHttpClientBuilder get() {
@@ -155,11 +154,6 @@ private void prepare() {
155154

156155
@Override
157156
public CloseableHttpClient build() {
158-
if (!this.prepared) {
159-
prepare();
160-
this.prepared = true;
161-
}
162-
163157
return this.httpClientBuilder.build();
164158
}
165159

0 commit comments

Comments
 (0)