Skip to content

Commit a85ad86

Browse files
committed
fix(client-v2): check for ConnectTimeoutException in shouldRetry
The catch block accepts ConnectTimeoutException; however, shouldRetry checks for ConnectException
1 parent 02542cc commit a85ad86

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
### New Features
44
- Added basic auth support for proxies. Now you can specify username/password when connecting via a proxy that requires it with HttpURLConnection and Apache HttpClient.
55

6+
### Bug Fixes
7+
- Fix for retrying on `ConnectTimeoutException`
8+
69
## 0.7.1-patch1
710

811
### Bug Fixes

client-v2/src/main/java/com/clickhouse/client/api/internal/HttpAPIClientHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ public boolean shouldRetry(Exception ex, Map<String, Object> requestSettings) {
583583
return retryCauses.contains(ClientFaultCause.NoHttpResponse);
584584
}
585585

586-
if (ex instanceof ConnectException) {
586+
if (ex instanceof ConnectTimeoutException) {
587587
return retryCauses.contains(ClientFaultCause.ConnectTimeout);
588588
}
589589

0 commit comments

Comments
 (0)