修改一些BUG
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
@@ -63,7 +63,10 @@ namespace LogCap.Common
|
||||
|
||||
//var payload_data= Encoding.UTF8.GetBytes(str);
|
||||
|
||||
await Program.mqttClient.PublishStringAsync(debug_log_report_mqtt_topic, str);
|
||||
if (Program.mqttClient != null && Program.mqttClient.IsConnected)
|
||||
{
|
||||
await Program.mqttClient.PublishStringAsync(debug_log_report_mqtt_topic, str);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -97,7 +100,10 @@ namespace LogCap.Common
|
||||
mm.TiaoMaoCUID = "";
|
||||
|
||||
string str = Newtonsoft.Json.JsonConvert.SerializeObject(mm);
|
||||
await Program.mqttClient.PublishStringAsync(debug_log_report_mqtt_topic_new, str);
|
||||
if (Program.mqttClient != null && Program.mqttClient.IsConnected)
|
||||
{
|
||||
await Program.mqttClient.PublishStringAsync(debug_log_report_mqtt_topic_new, str);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user