mirror of https://github.com/apache/cloudstack.git
Call cleanUp() before looping isStartup().
This commit is contained in:
parent
a5ca762acb
commit
9693b97c21
|
|
@ -394,15 +394,17 @@ public class Agent implements HandlerFactory, IAgentControl {
|
|||
} while (inProgress > 0);
|
||||
|
||||
_connection.stop();
|
||||
while (_connection.isStartup()) {
|
||||
_shell.getBackoffAlgorithm().waitBeforeRetry();
|
||||
}
|
||||
|
||||
try {
|
||||
_connection.cleanUp();
|
||||
} catch (final IOException e) {
|
||||
s_logger.warn("Fail to clean up old connection. " + e);
|
||||
}
|
||||
|
||||
while (_connection.isStartup()) {
|
||||
_shell.getBackoffAlgorithm().waitBeforeRetry();
|
||||
}
|
||||
|
||||
_connection = new NioClient("Agent", _shell.getHost(), _shell.getPort(), _shell.getWorkers(), this);
|
||||
do {
|
||||
s_logger.info("Reconnecting...");
|
||||
|
|
|
|||
Loading…
Reference in New Issue