From 9a524aa36412957685b73f466c47bf442086b9ff Mon Sep 17 00:00:00 2001 From: shijinping Date: Thu, 28 Nov 2013 14:38:30 +0800 Subject: [PATCH] =?UTF-8?q?double-check=20=E4=B8=AD=E5=86=8D=E5=8F=96?= =?UTF-8?q?=E6=AC=A1httpClient=E7=9A=84=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../us/codecraft/webmagic/downloader/HttpClientDownloader.java | 1 + 1 file changed, 1 insertion(+) diff --git a/webmagic-core/src/main/java/us/codecraft/webmagic/downloader/HttpClientDownloader.java b/webmagic-core/src/main/java/us/codecraft/webmagic/downloader/HttpClientDownloader.java index b6baaa7e..1daaad96 100644 --- a/webmagic-core/src/main/java/us/codecraft/webmagic/downloader/HttpClientDownloader.java +++ b/webmagic-core/src/main/java/us/codecraft/webmagic/downloader/HttpClientDownloader.java @@ -70,6 +70,7 @@ public class HttpClientDownloader implements Downloader { CloseableHttpClient httpClient = httpClients.get(domain); if (httpClient == null) { synchronized (this) { + httpClient = httpClients.get(domain); if (httpClient == null) { httpClient = httpClientGenerator.getClient(site); httpClients.put(domain, httpClient);