apache / plc4x

PLC4X The Industrial IoT adapter
https://plc4x.apache.org/
Apache License 2.0
1.2k stars 389 forks source link

[Bug]: modbus over serial port(com) could not closed successfully. #1610

Open liudianwei opened 1 month ago

liudianwei commented 1 month ago

What happened?

modbus over serial port(com) could not closed successfully, try to call PlcConnection.close() when com disconnect, it will be in an endless loop. the major reason is that it will call channel close by netty automatically when shutdown NioEventLoop, and serial channel will put an doClose in eventLoop, it will call close again because eventLoopUp is not empty, and than, trapped in a dead cycle... temp solution: close method should only support call once. image image image file location plc4x\plc4j\transports\serial\src\main\java\org\apache\plc4x\java\transport\serial

Version

latest

Programming Languages

Protocols

liudianwei commented 1 month ago

link #1342

liudianwei commented 1 month ago

link #1212