添加了防止短时间内重复调用

This commit is contained in:
2025-07-06 20:25:39 +08:00
parent 410ad03b3e
commit 6991ab501a
2 changed files with 2 additions and 2 deletions

View File

@@ -129,7 +129,7 @@ namespace PMSWPF.Services
// 发布MQTT消息。
await client.PublishAsync(message);
NlogHelper.Info($"Published {variable.Name} = {variable.DataValue} to {topic}/{variable.Name}"); // 记录发布信息
NlogHelper.Info($"Published {variable.Name} = {variable.DataValue} to {topic}/{variable.Name}",throttle:true); // 记录发布信息
variable.IsModified = false; // 发布后重置修改标志。
}
}