Skip to content

Commit d4362d5

Browse files
moresdpgeorge
authored andcommitted
aioble/examples/temp_sensor.py: Wait forever for client to disconnect.
This sets the disconnected timeout to None, so that the peripheral waits forever for the client to disconnect. Previously the peripheral would abort the connection after 60 seconds (because that's the default timeout). Signed-off-by: Stephen More <[email protected]>
1 parent 191494e commit d4362d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

micropython/bluetooth/aioble/examples/temp_sensor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ async def peripheral_task():
5656
appearance=_ADV_APPEARANCE_GENERIC_THERMOMETER,
5757
) as connection:
5858
print("Connection from", connection.device)
59-
await connection.disconnected()
59+
await connection.disconnected(timeout_ms=None)
6060

6161

6262
# Run both tasks.

0 commit comments

Comments
 (0)