Skip to content

Commit e87a655

Browse files
authored
Merge pull request #359 from youngsofun/fix
fix: start query retry on EOFException.
2 parents 73dc62c + d5fee69 commit e87a655

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

databend-jdbc/src/main/java/com/databend/jdbc/DatabendConnection.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,12 @@ private boolean shouldRetryException(Exception e) {
790790
return true;
791791
}
792792

793+
if (e instanceof IOException) {
794+
return (e.getMessage().contains("unexpected end of stream") ||
795+
e.getMessage().contains("timeout") ||
796+
e.getMessage().contains("connection refused"));
797+
}
798+
793799
if (e instanceof RuntimeException) {
794800
String message = e.getMessage();
795801
return message != null && (

0 commit comments

Comments
 (0)