make connection phy async

This commit is contained in:
Gilles Boccon-Gibod
2025-02-17 19:24:18 -08:00
parent 3f6f036270
commit 73d2b54e30
4 changed files with 49 additions and 62 deletions

View File

@@ -1098,8 +1098,11 @@ class Host(AbortableEventEmitter):
# Notify the client
if event.status == hci.HCI_SUCCESS:
connection_phy = ConnectionPHY(event.tx_phy, event.rx_phy)
self.emit('connection_phy_update', connection.handle, connection_phy)
self.emit(
'connection_phy_update',
connection.handle,
ConnectionPHY(event.tx_phy, event.rx_phy),
)
else:
self.emit('connection_phy_update_failure', connection.handle, event.status)