cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mlsoren...@apache.org
Subject git commit: updated refs/heads/4.5 to cb7bcf2
Date Wed, 15 Apr 2015 15:18:49 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 940622c32 -> cb7bcf23f


CLOUDSTACK-8387 - Don't autoclose new mgmt server peer connections as soon as they open


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

Branch: refs/heads/4.5
Commit: cb7bcf23fe349964a8251c1265e826d6b6c1af93
Parents: 940622c
Author: MS <m@turboio.com>
Authored: Wed Apr 15 08:08:10 2015 -0700
Committer: Marcus Sorensen <marcus_sorensen@apple.com>
Committed: Wed Apr 15 08:18:24 2015 -0700

----------------------------------------------------------------------
 .../src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cb7bcf23/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
b/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
index e38489b..2417f4d 100755
--- a/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
@@ -498,7 +498,8 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements
Clust
                 } catch (UnknownHostException e) {
                     throw new CloudRuntimeException("Unable to resolve " + ip);
                 }
-                try (SocketChannel ch1 = SocketChannel.open(new InetSocketAddress(addr, Port.value()));){
+                try {
+                    SocketChannel ch1 = SocketChannel.open(new InetSocketAddress(addr, Port.value()));
                     ch1.configureBlocking(true); // make sure we are working at blocking
mode
                     ch1.socket().setKeepAlive(true);
                     ch1.socket().setSoTimeout(60 * 1000);
@@ -516,8 +517,9 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements
Clust
                     if (s_logger.isDebugEnabled()) {
                         s_logger.debug("Connection to peer opened: " + peerName + ", ip:
" + ip);
                     }
-                    _peers.put(peerName, ch);
+                    _peers.put(peerName, ch1);
                     _sslEngines.put(peerName, sslEngine);
+                    return ch1;
                 } catch (IOException e) {
                     s_logger.warn("Unable to connect to peer management server: " + peerName
+ ", ip: " + ip + " due to " + e.getMessage(), e);
                     return null;


Mime
View raw message