Broadcast sources are currently deleted on the clean up triggered by turning scan off. Thix fix prevents the removal of sources to which we are synced by also checking if the device that will be removed is connected (sources to which we are synced are already marked as connected). --- src/adapter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/adapter.c b/src/adapter.c index 821d94592..bdc5bf920 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -1730,7 +1730,8 @@ static void discovery_cleanup(struct btd_adapter *adapter, int timeout) next = g_slist_next(l); - if (device_is_temporary(dev) && !device_is_connectable(dev)) + if (device_is_temporary(dev) && !device_is_connectable(dev) + && !btd_device_is_connected(dev)) btd_adapter_remove_device(adapter, dev); } } -- 2.40.1