changeset 485:45b3fe2375ef dispose

reconnetion process will execute after disconnection event
author sugi
date Sat, 06 Dec 2014 21:10:02 +0900
parents c00437e91db0
children 7be9054f7465
files src/main/java/alice/topology/node/IncomingConnectionInfo.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/alice/topology/node/IncomingConnectionInfo.java	Sat Dec 06 20:52:52 2014 +0900
+++ b/src/main/java/alice/topology/node/IncomingConnectionInfo.java	Sat Dec 06 21:10:02 2014 +0900
@@ -25,15 +25,15 @@
         } else {
             HostMessage hostInfo = this.hostInfo.asClass(HostMessage.class);
             if (DataSegment.contains(hostInfo.connectionName)) {
-                System.out.println("reconnection");
-                DataSegment.remove(hostInfo.connectionName);
+                // need to wait remove by DeleteConnection
+                ods.put("manager", absName, hostInfo);
             } else {
                 ods.put("cMember", hostInfo.connectionName);
                 new CreateConnectionList();
                 count++;
+                DataSegment.connect(hostInfo.connectionName, hostInfo.reverseName, hostInfo.name, hostInfo.port);
+                ods.put(hostInfo.connectionName, "reverseKey", hostInfo.reverseName);
             }
-            DataSegment.connect(hostInfo.connectionName, hostInfo.reverseName, hostInfo.name, hostInfo.port);
-            ods.put(hostInfo.connectionName, "reverseKey", hostInfo.reverseName);
 
         }