Added serialPort.closePort() to getUnixBasedPortNames()

This commit is contained in:
scream3r 2013-04-17 12:49:46 +04:00
parent 2590ae3a54
commit 618d77309e
1 changed files with 1 additions and 0 deletions

View File

@ -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)){