mirror of https://github.com/apache/jclouds.git
merged duplicate code branches
This commit is contained in:
parent
d9ccd506e7
commit
f55e4a5d3e
|
@ -231,13 +231,8 @@ public class SshjSshClient implements SshClient {
|
||||||
if (i + 1 == sshRetries) {
|
if (i + 1 == sshRetries) {
|
||||||
logger.error(from, "<< " + errorMessage + ": out of retries %d", sshRetries);
|
logger.error(from, "<< " + errorMessage + ": out of retries %d", sshRetries);
|
||||||
throw propagate(from, errorMessage);
|
throw propagate(from, errorMessage);
|
||||||
} else if (Throwables2.getFirstThrowableOfType(from, IllegalStateException.class) != null) {
|
} else if (shouldRetry(from) ||
|
||||||
logger.warn(from, "<< " + errorMessage + ": " + from.getMessage());
|
(Throwables2.getFirstThrowableOfType(from, IllegalStateException.class) != null)) {
|
||||||
backoffForAttempt(i + 1, errorMessage + ": " + from.getMessage());
|
|
||||||
if (connection != sshConnection)
|
|
||||||
connect();
|
|
||||||
continue;
|
|
||||||
} else if (shouldRetry(from)) {
|
|
||||||
logger.warn(from, "<< " + errorMessage + ": " + from.getMessage());
|
logger.warn(from, "<< " + errorMessage + ": " + from.getMessage());
|
||||||
backoffForAttempt(i + 1, errorMessage + ": " + from.getMessage());
|
backoffForAttempt(i + 1, errorMessage + ": " + from.getMessage());
|
||||||
if (connection != sshConnection)
|
if (connection != sshConnection)
|
||||||
|
|
Loading…
Reference in New Issue