If serial port gets disconnected (physically) & connected again while we do have a connection established we will have to ports available in OS. For example /dev/ttyUSB0 & /dev/ttyUSB1.
Steps to Reproduce the Problem
Check how many USB ports are available ls dev | grep ttyUSB
Connect serial port
Connect to port using ModbusSerialMaster
Disconnect port physically and reattach it
Check how many USB ports are available ls dev | grep ttyUSB - there should be 2 more ports allocated
Expected Behavior
If serial port is disconnected - lib should listen to LISTENING_EVENT_PORT_DISCONNECTED event and call [closePort](https://fazecast.github.io/jSerialComm/javadoc/com/fazecast/jSerialComm/SerialPort.html#closePort()) to prevent hanging serial port reference. More info at - https://fazecast.github.io/jSerialComm/javadoc/com/fazecast/jSerialComm/SerialPort.html#getCommPorts()
Actual Behavior
If serial port gets disconnected (physically) & connected again while we do have a connection established we will have to ports available in OS. For example
/dev/ttyUSB0
&/dev/ttyUSB1
.Steps to Reproduce the Problem
ls dev | grep ttyUSB
ls dev | grep ttyUSB
- there should be 2 more ports allocatedSpecifications