muka / go-bluetooth

Golang bluetooth client based on bluez DBus interfaces
Apache License 2.0
653 stars 124 forks source link

deadlock in dbus registration #108

Closed shigmas closed 3 years ago

shigmas commented 4 years ago

I've hit two deadlocks in running the discovery example. I think they may be the same cause. Or, in the very least, it might be the same steps that can be used to avoid the deadlock, since I'm very new to the bluez/dbus stack.

Anyway, It's easier to read in code, so I created a PR: https://github.com/muka/go-bluetooth/pull/107

muka commented 4 years ago

Hi, thank you for taking the time to report. I will check it, if you come to a solution please finalize your PR so we can review and merge.

muka commented 4 years ago

Hi I am reviewing the issue you reported.

I do agree the handleBeacon call block the context, will attempt a fix. The easiest is to ensure a context is avail for it to be cancelled and also run into a goroutine.

Let's see if the deadlock persist after those changes and from where it comes

Thank you!

shigmas commented 3 years ago

Was this fixed?