|
@@ -66,8 +66,7 @@ public class SessionHandler extends SimpleChannelHandler {
|
|
Short.valueOf(sub.getClientId()),
|
|
Short.valueOf(sub.getClientId()),
|
|
sub.getFilter());
|
|
sub.getFilter());
|
|
MDC.put("destination", clientIdentity.getDestination());
|
|
MDC.put("destination", clientIdentity.getDestination());
|
|
- embeddedServer.subscribe(clientIdentity);
|
|
|
|
-
|
|
|
|
|
|
+
|
|
// 尝试启动,如果已经启动,忽略
|
|
// 尝试启动,如果已经启动,忽略
|
|
if (!embeddedServer.isStart(clientIdentity.getDestination())) {
|
|
if (!embeddedServer.isStart(clientIdentity.getDestination())) {
|
|
ServerRunningMonitor runningMonitor = ServerRunningMonitors.getRunningMonitor(clientIdentity.getDestination());
|
|
ServerRunningMonitor runningMonitor = ServerRunningMonitors.getRunningMonitor(clientIdentity.getDestination());
|
|
@@ -75,6 +74,8 @@ public class SessionHandler extends SimpleChannelHandler {
|
|
runningMonitor.start();
|
|
runningMonitor.start();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ embeddedServer.subscribe(clientIdentity);
|
|
|
|
|
|
ctx.setAttachment(clientIdentity);// 设置状态数据
|
|
ctx.setAttachment(clientIdentity);// 设置状态数据
|
|
NettyUtils.ack(ctx.getChannel(), null);
|
|
NettyUtils.ack(ctx.getChannel(), null);
|