Log bluetooth advertisement before firing bleak callbacks (#80800)
The debug log was confusing because the bleak callbacks were firing before we were logging the advertisements
This commit is contained in:
parent
dd39ddca2f
commit
95d6859cb7
1 changed files with 6 additions and 5 deletions
|
@ -433,11 +433,7 @@ class BluetoothManager:
|
||||||
):
|
):
|
||||||
return
|
return
|
||||||
|
|
||||||
if is_connectable_by_any_source := address in self._connectable_history:
|
is_connectable_by_any_source = address in self._connectable_history
|
||||||
# Bleak callbacks must get a connectable device
|
|
||||||
for callback_filters in self._bleak_callbacks:
|
|
||||||
_dispatch_bleak_callback(*callback_filters, device, advertisement_data)
|
|
||||||
|
|
||||||
if not connectable and is_connectable_by_any_source:
|
if not connectable and is_connectable_by_any_source:
|
||||||
# Since we have a connectable path and our BleakClient will
|
# Since we have a connectable path and our BleakClient will
|
||||||
# route any connection attempts to the connectable path, we
|
# route any connection attempts to the connectable path, we
|
||||||
|
@ -456,6 +452,11 @@ class BluetoothManager:
|
||||||
advertisement_data.rssi,
|
advertisement_data.rssi,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if is_connectable_by_any_source:
|
||||||
|
# Bleak callbacks must get a connectable device
|
||||||
|
for callback_filters in self._bleak_callbacks:
|
||||||
|
_dispatch_bleak_callback(*callback_filters, device, advertisement_data)
|
||||||
|
|
||||||
for match in self._callback_index.match_callbacks(service_info):
|
for match in self._callback_index.match_callbacks(service_info):
|
||||||
callback = match[CALLBACK]
|
callback = match[CALLBACK]
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue