diff --git a/DataVAPI/UpAndDown/ProcessServer.cs b/DataVAPI/UpAndDown/ProcessServer.cs index 4a2a8a8..749ebd6 100644 --- a/DataVAPI/UpAndDown/ProcessServer.cs +++ b/DataVAPI/UpAndDown/ProcessServer.cs @@ -61,23 +61,22 @@ namespace DataVAPI.UpAndDown //MQTT 数据接收处理 ConsoleHelper.WriteInfoLine("尝试连接阿里云."); if (IOTDevServer.GetInstance().CreateLinks(DataBus.ProductKey, DataBus.DeviceName, DataBus.DeviceSecret)) - { - FistBOOL = true; + { + //属性状态变xin + //Subscribe(IOTDevServer.TargetStatusSubTopic); + + //订阅上下线 + Subscribe(IOTDevServer.HeartbeatSubTopic); + + //订阅主播消息 + Subscribe(IOTDevServer.BroadcastTopic); ConsoleHelper.WriteSuccessLine($"阿里云【Transit】连接成功"); } else { - FistBOOL = false; ConsoleHelper.WriteSuccessLine($"阿里云【Transit】连接失败"); } - //属性状态变xin - //Subscribe(IOTDevServer.TargetStatusSubTopic); - - //订阅上下线 - Subscribe(IOTDevServer.HeartbeatSubTopic); - //订阅主播消息 - Subscribe(IOTDevServer.BroadcastTopic); IOTDevServer.UNConnectMqtt += new Action((o) => { ConsoleHelper.WriteSuccessLine(o); });