mirror of
https://github.com/google/bumble.git
synced 2026-04-18 00:45:32 +00:00
HAP: wait for MTU to process reconnection event
When HAP reconnect, it sends indication of all events that happen during the disconnection. But it should wait for the profile to be ready and for the MTU to have been negotiated or else the remote may not be ready yet. As a side effect of this, the current GattServer doesn't re-populate the handle of subscriber during a reconnection, we have to bypass this check to send the notification
This commit is contained in:
@@ -82,7 +82,6 @@ async def hap_client():
|
||||
)
|
||||
|
||||
await devices.setup_connection()
|
||||
# TODO negotiate MTU > 49 to not truncate preset names
|
||||
|
||||
# Mock encryption.
|
||||
devices.connections[0].encryption = 1 # type: ignore
|
||||
@@ -93,6 +92,9 @@ async def hap_client():
|
||||
)
|
||||
|
||||
peer = device.Peer(devices.connections[1]) # type: ignore
|
||||
await peer.request_mtu(49)
|
||||
peer2 = device.Peer(devices.connections[0]) # type: ignore
|
||||
await peer2.request_mtu(49)
|
||||
hap_client = await peer.discover_service_and_create_proxy(
|
||||
hap.HearingAccessServiceProxy
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user