cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject [1/3] git commit: updated refs/heads/master to 1a47437
Date Wed, 23 Sep 2015 05:52:31 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 86325cbc9 -> 1a474374b


Call cleanUp() before looping isStartup().


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9693b97c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9693b97c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9693b97c

Branch: refs/heads/master
Commit: 9693b97c2147b3fdb9579a1ebb33597cd3bf1d11
Parents: a5ca762
Author: Boris Schrijver <boris@pcextreme.nl>
Authored: Mon Sep 21 16:54:56 2015 +0200
Committer: Boris Schrijver <boris@pcextreme.nl>
Committed: Mon Sep 21 16:54:56 2015 +0200

----------------------------------------------------------------------
 agent/src/com/cloud/agent/Agent.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9693b97c/agent/src/com/cloud/agent/Agent.java
----------------------------------------------------------------------
diff --git a/agent/src/com/cloud/agent/Agent.java b/agent/src/com/cloud/agent/Agent.java
index e3510c4..f39d0e7 100644
--- a/agent/src/com/cloud/agent/Agent.java
+++ b/agent/src/com/cloud/agent/Agent.java
@@ -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...");


Mime
View raw message