Skip to content

Commit 4661daa

Browse files
committed
Merge branch '4.11': Fixes #2633 don't block agent for pending tasks on reconnection (#2638)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2 parents a7e2489 + d893fb5 commit 4661daa

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

agent/src/main/java/com/cloud/agent/Agent.java

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -495,19 +495,7 @@ protected void reconnect(final Link link) {
495495

496496
_resource.disconnected();
497497

498-
final String lastConnectedHost = _shell.getConnectedHost();
499-
500-
int inProgress = 0;
501-
do {
502-
_shell.getBackoffAlgorithm().waitBeforeRetry();
503-
504-
s_logger.info("Lost connection to host: " + lastConnectedHost + ". Dealing with the remaining commands...");
505-
506-
inProgress = _inProgress.get();
507-
if (inProgress > 0) {
508-
s_logger.info("Cannot connect because we still have " + inProgress + " commands in progress.");
509-
}
510-
} while (inProgress > 0);
498+
s_logger.info("Lost connection to host: " + _shell.getConnectedHost() + ". Attempting reconnection while we still have " + _inProgress.get() + " commands in progress.");
511499

512500
_connection.stop();
513501

0 commit comments

Comments
 (0)