mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-21 09:31:20 -08:00
Ensure serial port closure
This commit is contained in:
1 file changed
+5
@@ -117,6 +117,11 @@ class AndroidSerialHandler(val activity: AppCompatActivity) :
|
||||
}
|
||||
}
|
||||
|
||||
// If this port is still open for whatever reason, close it
|
||||
if (port.port.isOpen) {
|
||||
port.port.close()
|
||||
}
|
||||
|
||||
LogManager.info("[SerialHandler] Device removed: ${port.descriptivePortName}")
|
||||
listeners.forEach { it.onSerialDeviceDeleted(port) }
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user