()
| 86 | } |
| 87 | |
| 88 | public synchronized void close() { |
| 89 | parent.portClosed(this); |
| 90 | |
| 91 | safeDestruct.beginShutdown(); |
| 92 | |
| 93 | if( serialDevice != null) { |
| 94 | serialDevice.close(); |
| 95 | serialDevice = null; |
| 96 | } |
| 97 | |
| 98 | if (connection != null) { |
| 99 | connection.close(); |
| 100 | connection = null; |
| 101 | } |
| 102 | |
| 103 | safeDestruct.finishShutdown(); |
| 104 | } |
| 105 | |
| 106 | /** |
| 107 | * Called by UsbSerialHelper after the device got disconnected. |
nothing calls this directly
no test coverage detected