|
@@ -33,10 +33,7 @@ public class IotServerReceiveMessageThread implements Runnable {
|
|
|
while (true) {
|
|
|
try {
|
|
|
tcpControl = IotServer.tcpControlServerManager.takeRece();
|
|
|
- if (tcpControl != null) {
|
|
|
- if (tcpControl.address == null) {
|
|
|
- break;
|
|
|
- }
|
|
|
+ if (tcpControl != null && tcpControl.address == null) {
|
|
|
addProject(tcpControl, "tcpControl");
|
|
|
log.info("收到iot-project 控制消息:{}", tcpControl);
|
|
|
kafkaProducer.sendFromedge2control(tcpControl);
|
|
@@ -50,10 +47,7 @@ public class IotServerReceiveMessageThread implements Runnable {
|
|
|
while (true) {
|
|
|
try {
|
|
|
tcpCollect = IotServer.tcpCollectServerManager.takeRece();
|
|
|
- if (tcpCollect != null) {
|
|
|
- if (tcpCollect.address == null) {
|
|
|
- break;
|
|
|
- }
|
|
|
+ if (tcpCollect != null && tcpCollect.address == null) {
|
|
|
addProject(tcpCollect, "tcpCollect");
|
|
|
log.info("收到iot-project 采集消息:{}", tcpCollect);
|
|
|
kafkaProducer.sendFromedge2collect(tcpCollect);
|