TODO 掉线重连机制 (待完成)

This commit is contained in:
2025-05-30 14:17:22 +08:00
parent c02845ddc3
commit dfdd9f442c
2 changed files with 2 additions and 2 deletions

View File

@@ -172,7 +172,7 @@ namespace RIZO_Application.Modules.ModuleName.ViewModels
_eventAggregator.GetEvent<SystemLogEvent>().Publish(message);
if (retries>=maxRetries)
{
MessageBox.Show("MQTT已掉线请停止扫码");
MessageBox.Show("MQTT服务器已掉线,请停止扫码并重启系统");
}
}
public async void Destroy()

View File

@@ -25,7 +25,7 @@ namespace RIZO_Helper.Tools
public Action<string, int, int> Disconnected;
public MqttHelper(string server, int port = 1883, string clientId = "wpf-demo", bool cleanSession = true)
public MqttHelper(string server, int port = 1883, string clientId = "wpf-demo", bool cleanSession = false)
{
if (string.IsNullOrEmpty(server))
throw new ArgumentNullException(nameof(server), "MQTT服务器地址不能为空");