黄学彪
2020-12-16 28d269d8aa90eca5470fff825a9b9545135a3ec0
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -310,23 +310,9 @@
                    if (RemoteMqttClient.ConnectedHandler == null)
                    {
                        RemoteMqttClient.UseConnectedHandler(async (e) => {
                            if (DB_ResidenceData.Instance.HomeGateway.gatewayStatus)
                            if (DB_ResidenceData.Instance.HomeGateway.GatewayOnline)
                            {
                                Control.Ins.GatewayOnline = true;
                            }
                            else
                            {
                                //new System.Threading.Thread(() => {
                                //    while(true)
                                //    {
                                //        System.Threading.Thread.Sleep(1000);
                                //        if (DB_ResidenceData.Instance.HomeGateway.GatewayOnline)
                                //        {
                                //            Control.Ins.GatewayOnline = true;
                                //            break;
                                //        }
                                //    }
                                //}) { IsBackground = true }.Start();
                            }
                            IfNeedReadAllDeviceStatus = true;
                            Utlis.WriteLine($"============>Mqtt远程连接成功");