Эх сурвалжийг харах

asnclient connect algorithm modity

shjung 2 долоо хоног өмнө
parent
commit
6d04dabd36

+ 7 - 0
utic-its-common/src/main/java/com/utic/its/common/xnet/client/handler/ItsAsnClient.java

@@ -67,6 +67,13 @@ public class ItsAsnClient implements Callable<Object> {
                 scheduleReconnect(this.retryConnectSeconds); // 재연결 예약
                 scheduleReconnect(this.retryConnectSeconds); // 재연결 예약
                 return null;
                 return null;
             }
             }
+            if (this.center.getActiveClusterId() > 0 && this.center.getNetState().isActive()) {
+                // 실제 통신연결이 되어있는 경우 다시 스케쥴에 등록하도록 한다. (이미 연결되어있는 경우)
+                // HA 로 동작하지 않는경우 clusterId == 0 이므로 통신이 연결되더라도 activeClusterId = 0 이다.
+                // 따라서 이 경우는 HA 모드로 동작하는 경우에만 처리된다.
+                scheduleReconnect(this.retryConnectSeconds); // 재연결 예약
+                return null;
+            }
         }
         }
 
 
         try {
         try {