mirror of
https://gitee.com/ThingsGateway/ThingsGateway.git
synced 2025-10-21 11:08:13 +08:00
修复导出变量偶发丢失上传属性的问题
This commit is contained in:
@@ -270,13 +270,16 @@ public class VariableService : DbRepository<DeviceVariable>, IVariableService
|
||||
{
|
||||
//插件名称去除首部ThingsGateway.作为表名
|
||||
var pluginName = driverPluginDicts[uploadDevice.PluginName].Name;
|
||||
if (devicePropertys.ContainsKey(pluginName))
|
||||
lock (devicePropertys)
|
||||
{
|
||||
devicePropertys[pluginName].Add(driverInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
devicePropertys.TryAdd(pluginName, new() { driverInfo });
|
||||
if (devicePropertys.ContainsKey(pluginName))
|
||||
{
|
||||
devicePropertys[pluginName].Add(driverInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
devicePropertys.TryAdd(pluginName, new() { driverInfo });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user