Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deadlock with two devices #89

Open
rdeo-aziwell opened this issue Nov 29, 2023 · 0 comments
Open

Deadlock with two devices #89

rdeo-aziwell opened this issue Nov 29, 2023 · 0 comments

Comments

@rdeo-aziwell
Copy link
Contributor

Everything locks if I try to use more that one device:

@Test
fun deadLockTwoDevices() = runBlocking {
    val j1 = scope.launch {
        repeat(5) {
            val c1 = ClientBleGatt.connect(InstrumentationRegistry.getInstrumentation().targetContext, address, scope)
            c1.requestMtu(247)
            c1.requestConnectionPriority(BleGattConnectionPriority.LOW_POWER)
            c1.disconnect()
        }
    }

    val j2 = scope.launch {
        repeat(5) {
            val c2 = ClientBleGatt.connect(InstrumentationRegistry.getInstrumentation().targetContext, address2, scope)
            c2.requestMtu(247)
            c2.requestConnectionPriority(BleGattConnectionPriority.LOW_POWER)
            c2.disconnect()
        }
    }

    j1.join()
    j2.join()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant