fix: remove v-battery when device disconnects

This commit is contained in:
Dmitry Sharshakov 2021-03-11 18:15:17 +03:00 committed by Wim Taymans
parent a0ac3ac8dd
commit e2ac16ccbd

View file

@ -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);