We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33a0245 commit cbb5a9fCopy full SHA for cbb5a9f
src/main/java/jssc/SerialPort.java
@@ -1182,6 +1182,7 @@ public synchronized boolean removeEventListener() throws SerialPortException {
1182
* @throws SerialPortException if exception occurred
1183
*/
1184
public synchronized boolean closePort() throws SerialPortException {
1185
+ if (!portOpened) return false;
1186
boolean returnValue;
1187
//removeEventListener calls setEventsMask, and must occur before calling closePort
1188
try {
0 commit comments