Closed
Description
As noted in #63, There are several methods in the library that are described in javadoc as returning true
or false
to signify a success, but in fact throwing an exception on failure. The particulary nasty stack for us is:
closePort -> removeEventListener -> setEventMask
because in the case where USB serial adapter is already disconnected, this throws an exception before closePort -> serialInterface.closePort(portHandle);
is fired.
As a result, the device is not released. Some other software we use that also queries serial ports still sees that ghost port (or sees multiple COM ports, with duplicated number if the adapter is reconnected), even when Device Manager does not.
Metadata
Metadata
Assignees
Labels
No labels