From e2ac16ccbd4a563628202ce38c290a1452f7d465 Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Thu, 11 Mar 2021 18:15:17 +0300 Subject: [PATCH] fix: remove v-battery when device disconnects --- spa/plugins/bluez5/bluez5-dbus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spa/plugins/bluez5/bluez5-dbus.c b/spa/plugins/bluez5/bluez5-dbus.c index 9cd266329..3751bdb7b 100644 --- a/spa/plugins/bluez5/bluez5-dbus.c +++ b/spa/plugins/bluez5/bluez5-dbus.c @@ -738,6 +738,8 @@ static int device_remove(struct spa_bt_monitor *monitor, struct spa_bt_device *d if (!device->added) return 0; + battery_remove(device); + device->added = false; spa_device_emit_object_info(&monitor->hooks, device->id, NULL);