mirror of
https://gitee.com/ThingsGateway/ThingsGateway.git
synced 2025-10-20 10:50:48 +08:00
modbusslave 异常捕获
This commit is contained in:
@@ -484,6 +484,10 @@ public class ModbusSlave : DeviceBase, IModbusAddress
|
||||
await ReturnData(client, valueByteBlock.Memory, e).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
await WriteError(modbusRtu, client, Bytes, e).ConfigureAwait(false);
|
||||
}
|
||||
finally
|
||||
{
|
||||
valueByteBlock.SafeDispose();
|
||||
|
Reference in New Issue
Block a user