123
This commit is contained in:
1 parent
f0b438eb6c
commit
77557ce4af
1 file changed
+7
-1
@@ -59,7 +59,7 @@ public class HttpHelper {
|
||||
public void setProxyPort(Integer proxyPort) {
|
||||
this.proxyPort = proxyPort;
|
||||
}
|
||||
public void closeClient(){
|
||||
public synchronized void closeClient(){
|
||||
try {
|
||||
if (httpsClient != null) {
|
||||
httpsClient.close();
|
||||
@@ -72,6 +72,12 @@ public class HttpHelper {
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(),e);
|
||||
}
|
||||
if (cm != null) {
|
||||
cm.close();
|
||||
}
|
||||
cm = new PoolingHttpClientConnectionManager();
|
||||
cm.setMaxTotal(500);
|
||||
cm.setDefaultMaxPerRoute(5);
|
||||
}
|
||||
public static void main(String[] args) throws Exception {
|
||||
BigDecimal decimal = new BigDecimal("1").divide(new BigDecimal(100));
|
||||
|
||||
Reference in new issue
Block a user