Skip to content

Commit 4f53b07

Browse files
committed
Merge pull request #44 from supermicah/master
double-check 中再取次httpClient的内容
2 parents cb84220 + 9a524aa commit 4f53b07

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

webmagic-core/src/main/java/us/codecraft/webmagic/downloader/HttpClientDownloader.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ private CloseableHttpClient getHttpClient(Site site) {
7070
CloseableHttpClient httpClient = httpClients.get(domain);
7171
if (httpClient == null) {
7272
synchronized (this) {
73+
httpClient = httpClients.get(domain);
7374
if (httpClient == null) {
7475
httpClient = httpClientGenerator.getClient(site);
7576
httpClients.put(domain, httpClient);

0 commit comments

Comments
 (0)