Merge pull request #44 from supermicah/master

double-check 中再取次httpClient的内容
master
Yihua Huang 2013-11-27 23:28:20 -08:00
commit 4f53b07e47
1 changed files with 1 additions and 0 deletions

View File

@ -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);