Commit 9a524aa3 authored by shijinping's avatar shijinping

double-check 中再取次httpClient的内容

parent cb84220d
...@@ -70,6 +70,7 @@ public class HttpClientDownloader implements Downloader { ...@@ -70,6 +70,7 @@ public class HttpClientDownloader implements Downloader {
CloseableHttpClient httpClient = httpClients.get(domain); CloseableHttpClient httpClient = httpClients.get(domain);
if (httpClient == null) { if (httpClient == null) {
synchronized (this) { synchronized (this) {
httpClient = httpClients.get(domain);
if (httpClient == null) { if (httpClient == null) {
httpClient = httpClientGenerator.getClient(site); httpClient = httpClientGenerator.getClient(site);
httpClients.put(domain, httpClient); httpClients.put(domain, httpClient);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment