Skip to content

Commit 1c0b27e

Browse files
committed
Do not retry when error message contains "Connection refused"
1 parent 1e31696 commit 1c0b27e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/org/embulk/input/sftp/SftpFileInput.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,10 @@ public boolean isRetryableException(Exception exception)
266266
{
267267
if (exception.getCause() != null && exception.getCause().getCause() != null) {
268268
Throwable cause = exception.getCause().getCause();
269-
if (cause.getMessage() != null && cause.getMessage().contains("Auth fail")) {
270-
throw new ConfigException(exception);
269+
if (cause.getMessage() != null) {
270+
if (cause.getMessage().contains("Auth fail") || cause.getMessage().contains("Connection refused")) {
271+
throw new ConfigException(exception);
272+
}
271273
}
272274
}
273275
if (exception instanceof ConfigException) {

0 commit comments

Comments
 (0)