mirror of
https://gitee.com/ThingsGateway/ThingsGateway.git
synced 2025-11-02 08:33:59 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6291ce8617 |
@@ -5,7 +5,7 @@
|
|||||||
<LangVersion>11.0</LangVersion>
|
<LangVersion>11.0</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<Version>5.0.1.16</Version>
|
<Version>5.0.1.17</Version>
|
||||||
<Authors>Diego</Authors>
|
<Authors>Diego</Authors>
|
||||||
<Company>Diego</Company>
|
<Company>Diego</Company>
|
||||||
<Product>Diego</Product>
|
<Product>Diego</Product>
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public class ManagementWoker : BackgroundService
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_ = CollectDeviceWorker.StopAsync(false);
|
_ = CollectDeviceWorker.StopAsync(!IsStartBusinessDevice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ using ThingsGateway.Foundation.Extension.String;
|
|||||||
using ThingsGateway.Foundation.Modbus;
|
using ThingsGateway.Foundation.Modbus;
|
||||||
using ThingsGateway.Gateway.Application;
|
using ThingsGateway.Gateway.Application;
|
||||||
|
|
||||||
|
using TouchSocket.Sockets;
|
||||||
|
|
||||||
namespace ThingsGateway.Plugin.Modbus;
|
namespace ThingsGateway.Plugin.Modbus;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -111,6 +113,7 @@ public class ModbusSlave : BusinessBase
|
|||||||
CurrentDevice.SetDeviceStatus(DateTimeUtil.Now, 999);
|
CurrentDevice.SetDeviceStatus(DateTimeUtil.Now, 999);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Protocol.Channel.Close();
|
||||||
await Protocol.Channel.ConnectAsync(3000, cancellationToken);
|
await Protocol.Channel.ConnectAsync(3000, cancellationToken);
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user