diff --git a/IoTGateway/IoTGateway.csproj b/IoTGateway/IoTGateway.csproj
index 4986f36..330cb03 100644
--- a/IoTGateway/IoTGateway.csproj
+++ b/IoTGateway/IoTGateway.csproj
@@ -7,6 +7,8 @@
zh-Hans,en
true
Linux
+ false
+ true
diff --git a/Plugins/Plugin/DeviceThread.cs b/Plugins/Plugin/DeviceThread.cs
index 1e9c273..bba0ce7 100644
--- a/Plugins/Plugin/DeviceThread.cs
+++ b/Plugins/Plugin/DeviceThread.cs
@@ -41,6 +41,7 @@ namespace Plugin
if (Device.AutoStart)
{
_logger.LogInformation($"线程已启动:{Device.DeviceName}");
+ Task.Delay(8000);
if (Device.DeviceVariables != null)
{
@@ -79,7 +80,7 @@ namespace Plugin
{
foreach (var item in Device.DeviceVariables.OrderBy(x => x.Index))
{
- Thread.Sleep((int)Device.CmdPeriod);
+ Task.Delay((int)Device.CmdPeriod);
var ret = new DriverReturnValueModel();
var ioarg = new DriverAddressIoArgModel
@@ -188,7 +189,7 @@ namespace Plugin
}
- Thread.Sleep((int)Driver.MinPeriod);
+ Task.Delay((int)Driver.MinPeriod);
}
}, TaskCreationOptions.LongRunning);
}
diff --git a/Plugins/Plugin/Plugin.csproj b/Plugins/Plugin/Plugin.csproj
index e52292c..5b7286d 100644
--- a/Plugins/Plugin/Plugin.csproj
+++ b/Plugins/Plugin/Plugin.csproj
@@ -1,22 +1,24 @@
-
- net6.0
- enable
- enable
-
+
+ net6.0
+ enable
+ enable
+ false
+ true
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+