Commit 88980bb9 authored by AfirSraftGarrier's avatar AfirSraftGarrier

格式并加些打印

parent ae66cd17
...@@ -143,7 +143,7 @@ public class DeviceServerHandler extends SimpleChannelInboundHandler<Object> { ...@@ -143,7 +143,7 @@ public class DeviceServerHandler extends SimpleChannelInboundHandler<Object> {
DeviceManager deviceManager = SpringUtil.getBean(DeviceManager.class); DeviceManager deviceManager = SpringUtil.getBean(DeviceManager.class);
deviceManager.putSession(appId, session); deviceManager.putSession(appId, session);
//TODO 创建透传的客户端 // 创建透传的客户端
CreateForwarClientEvent event = new CreateForwarClientEvent(); CreateForwarClientEvent event = new CreateForwarClientEvent();
event.setAppId(appId); event.setAppId(appId);
eventPublisher.publishEvent(event); eventPublisher.publishEvent(event);
......
...@@ -11,8 +11,6 @@ import org.springframework.stereotype.Component; ...@@ -11,8 +11,6 @@ import org.springframework.stereotype.Component;
@Component @Component
@Slf4j @Slf4j
public class CreateForwarClientEventHandler { public class CreateForwarClientEventHandler {
@Autowired @Autowired
ForwardManager forwardManager; ForwardManager forwardManager;
@Autowired @Autowired
...@@ -22,14 +20,11 @@ public class CreateForwarClientEventHandler { ...@@ -22,14 +20,11 @@ public class CreateForwarClientEventHandler {
public CreateForwarClientEventHandler() { public CreateForwarClientEventHandler() {
} }
@EventListener @EventListener
public void handlerEvent(CreateForwarClientEvent event) { public void handlerEvent(CreateForwarClientEvent event) {
String appId = event.getAppId(); String appId = event.getAppId();
Server balanceServer = balanceManager.getBalanceServer(); Server balanceServer = balanceManager.getBalanceServer();
if (balanceServer != null) { if (balanceServer != null) {
String serverIp = balanceServer.getServerIp(); String serverIp = balanceServer.getServerIp();
...@@ -38,9 +33,5 @@ public class CreateForwarClientEventHandler { ...@@ -38,9 +33,5 @@ public class CreateForwarClientEventHandler {
} else { } else {
log.error("balanceServer is null"); log.error("balanceServer is null");
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment