From 259d16026f2b1bfd129af122549e9b78c2ef03ff Mon Sep 17 00:00:00 2001 From: zhaoliang Date: Wed, 12 Dec 2018 20:37:28 +0800 Subject: [PATCH] =?UTF-8?q?Modify:=20=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/arronlong/httpclientutil/builder/HCB.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/arronlong/httpclientutil/builder/HCB.java b/src/main/java/com/arronlong/httpclientutil/builder/HCB.java index f748a2d..0ca55d2 100644 --- a/src/main/java/com/arronlong/httpclientutil/builder/HCB.java +++ b/src/main/java/com/arronlong/httpclientutil/builder/HCB.java @@ -50,7 +50,7 @@ public static HCB custom(){ /** * 设置超时时间 * - * @param timeout 超市时间,单位-毫秒 + * @param timeout 超时时间,单位-毫秒 * @return 返回当前对象 */ @Deprecated @@ -115,12 +115,12 @@ public HCB ssl(String keyStorePath) throws HttpProcessException{ * 设置自定义sslcontext * * @param keyStorePath 密钥库路径 - * @param keyStorepass 密钥库密码 + * @param keyStorePass 密钥库密码 * @return 返回当前对象 * @throws HttpProcessException http处理异常 */ - public HCB ssl(String keyStorePath, String keyStorepass) throws HttpProcessException{ - this.ssls = SSLs.custom().customSSL(keyStorePath, keyStorepass); + public HCB ssl(String keyStorePath, String keyStorePass) throws HttpProcessException{ + this.ssls = SSLs.custom().customSSL(keyStorePath, keyStorePass); // this.isNewSSL=true; return ssl(); } @@ -192,14 +192,14 @@ public boolean retryRequest(IOException exception, int executionCount, HttpConte if (exception instanceof SSLHandshakeException) {// 不要重试SSL握手异常 return false; } - if (exception instanceof InterruptedIOException) {// 超时 + if (exception instanceof InterruptedIOException) {// 连接被拒绝 //return false; return retryWhenInterruptedIO; } if (exception instanceof UnknownHostException) {// 目标服务器不可达 return true; } - if (exception instanceof ConnectTimeoutException) {// 连接被拒绝 + if (exception instanceof ConnectTimeoutException) {// 超时 return false; } if (exception instanceof SSLException) {// SSL握手异常