Splitting the service state test out of btd_device_is_connected and using only the bearer-specific test from adapter_remove_connection. This intends to fix a busy loop that happens when BT is disabled from userspace with e.g. "rfkill block bluetooth": 1. Connect at least one device. 2. Run rfkill block bluetooth. 3. bluetoothd takes 100% CPU. Bug reports: https://github.com/bluez/bluez/issues/785 https://bugzilla.redhat.com/show_bug.cgi?id=2269516 Dimitris (1): refactor bearer connected test src/adapter.c | 2 +- src/device.c | 7 ++++++- src/device.h | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) -- 2.44.0