fix(input): a failing BLE disconnect no longer ends the app or the unit test run (#2670)

This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-11-15 10:46:16 -05:00
1 parent fb14b99d50
commit 605f85b4b9
2 files changed
+13 -5

No files matched your search

@@ -129,8 +129,9 @@ class SteamControllerBle(private val context: Context, router: InputRouter? = nu
}
}
}
g.disconnect()
g.close()
// Android can refuse these (BLUETOOTH_CONNECT revoked); an exception on this thread would end the app.
runCatching { g.disconnect() }.onFailure { Log.w(TAG, "disconnect failed", it) }
runCatching { g.close() }.onFailure { Log.w(TAG, "close failed", it) }
Log.i(TAG, "disconnected: $why")
listener?.invoke()
}