Added serialPort.closePort() to getUnixBasedPortNames()
This commit is contained in:
parent
2590ae3a54
commit
618d77309e
|
@ -193,6 +193,7 @@ public class SerialPortList {
|
||||||
SerialPort serialPort = new SerialPort(portName);
|
SerialPort serialPort = new SerialPort(portName);
|
||||||
try {
|
try {
|
||||||
serialPort.openPort();
|
serialPort.openPort();
|
||||||
|
serialPort.closePort();
|
||||||
}
|
}
|
||||||
catch (SerialPortException ex) {
|
catch (SerialPortException ex) {
|
||||||
if(!ex.getExceptionType().equals(SerialPortException.TYPE_PORT_BUSY)){
|
if(!ex.getExceptionType().equals(SerialPortException.TYPE_PORT_BUSY)){
|
||||||
|
|
Loading…
Reference in New Issue