wxr
2020-12-17 1a13c963a5fb8cad92bf03667e411f46d6a6a843
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -310,10 +310,24 @@
                    if (RemoteMqttClient.ConnectedHandler == null)
                    {
                        RemoteMqttClient.UseConnectedHandler(async (e) => {
                            if (DB_ResidenceData.Instance.HomeGateway.GatewayOnline)
                            if (DB_ResidenceData.Instance.HomeGateway.gatewayStatus)
                            {
                                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远程连接成功");
                            SendPushSignOut();