|
|
@@ -100,16 +100,17 @@ public class CvimServerInboundMessageHandler extends ChannelInboundHandlerAdapte
|
|
|
|
|
|
this.sessionManager.removeChannel(ctx.channel());
|
|
|
ctx.channel().attr(TsiSessionManager.TSI_NODE_ATTRIBUTE_KEY).set(null);
|
|
|
-
|
|
|
this.queueDistributorService.releaseQueue(nodeVo); // 작업큐를 할당을 해제한다.
|
|
|
- if (nodeVo.getChannel() == ctx.channel()) {
|
|
|
- // 현재 비활성화되는 채널이 nodeVo에 등록된 활성 채널과 동일한 경우에만
|
|
|
- nodeVo.setConnect(null);
|
|
|
- log.info("channelInactive: {}, {}, sessions: {}", nodeVo.getNodeId(), remoteIpAddr, sessions);
|
|
|
- }
|
|
|
- else {
|
|
|
- // 새로운 연결에 의해 강제로 종료되었음
|
|
|
- log.warn("channelInactive: {}, {}, sessions: {}, Duplicate Connected.", nodeVo.getNodeId(), remoteIpAddr, sessions);
|
|
|
+
|
|
|
+ synchronized (nodeVo) {
|
|
|
+ if (nodeVo.getChannel() == ctx.channel()) {
|
|
|
+ // 현재 비활성화되는 채널이 nodeVo에 등록된 활성 채널과 동일한 경우에만
|
|
|
+ nodeVo.setConnect(null);
|
|
|
+ log.info("channelInactive: {}, {}, sessions: {}", nodeVo.getNodeId(), remoteIpAddr, sessions);
|
|
|
+ } else {
|
|
|
+ // 새로운 연결에 의해 강제로 종료되었음
|
|
|
+ log.warn("channelInactive: {}, {}, sessions: {}, Duplicate Connected.", nodeVo.getNodeId(), remoteIpAddr, sessions);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else {
|