mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-14 22:55:12 +10:00
Improve USB disconnection handling and add payload length validation for USB frames
This commit is contained in:
committed by
just-stuff-tm
parent
3542adad1d
commit
3cec3dc233
@@ -105,8 +105,12 @@ class MainActivity : FlutterActivity() {
|
||||
"connect" -> handleUsbConnect(call, result)
|
||||
"write" -> handleUsbWrite(call, result)
|
||||
"disconnect" -> {
|
||||
closeUsbConnection()
|
||||
result.success(null)
|
||||
usbIoExecutor.execute {
|
||||
closeUsbConnection()
|
||||
mainHandler.post {
|
||||
result.success(null)
|
||||
}
|
||||
}
|
||||
}
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user