Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/main/java/com/arronlong/httpclientutil/builder/HCB.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static HCB custom(){
/**
* 设置超时时间
*
* @param timeout 超市时间,单位-毫秒
* @param timeout 超时时间,单位-毫秒
* @return 返回当前对象
*/
@Deprecated
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -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握手异常
Expand Down