mirror of
https://github.com/google/bumble.git
synced 2026-04-16 00:25:31 +00:00
Update apps and examples to await .terminated
This commit is contained in:
@@ -352,7 +352,7 @@ async def run(
|
||||
await bridge.start()
|
||||
|
||||
# Wait until the source terminates
|
||||
await hci_source.wait_for_termination()
|
||||
await hci_source.terminated
|
||||
|
||||
|
||||
@click.command()
|
||||
|
||||
@@ -268,7 +268,7 @@ async def run(device_config, hci_transport, bridge):
|
||||
await bridge.start(device)
|
||||
|
||||
# Wait until the transport terminates
|
||||
await hci_source.wait_for_termination()
|
||||
await hci_source.terminated
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@@ -421,7 +421,7 @@ async def run(device_config, hci_transport, bridge):
|
||||
await bridge.start(device)
|
||||
|
||||
# Wait until the transport terminates
|
||||
await hci_source.wait_for_termination()
|
||||
await hci_source.terminated
|
||||
except core.ConnectionError as error:
|
||||
print(color(f"!!! Bluetooth connection failed: {error}", "red"))
|
||||
except Exception as error:
|
||||
|
||||
@@ -190,7 +190,7 @@ async def scan(
|
||||
scanning_phys=scanning_phys,
|
||||
)
|
||||
|
||||
await hci_source.wait_for_termination()
|
||||
await hci_source.terminated
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@@ -726,7 +726,7 @@ class Speaker:
|
||||
print("Waiting for connection...")
|
||||
await self.advertise()
|
||||
|
||||
await hci_source.wait_for_termination()
|
||||
await hci_source.terminated
|
||||
|
||||
for output in self.outputs:
|
||||
await output.stop()
|
||||
|
||||
Reference in New Issue
Block a user