8000 aioble/server: Log warning on out-of-order indication. · micropython/micropython-lib@8254f6b · GitHub
[go: up one dir, main page]

Skip to content

Commit 8254f6b

Browse files
committed
aioble/server: Log warning on out-of-order indication.
1 parent cdd260f commit 8254f6b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

micropython/bluetooth/aioble/aioble/server.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,11 @@ def _indicate_done(conn_handle, value_handle, status):
231231
# Timeout.
232232
return
233233
# See TODO in __init__ to support multiple concurrent indications.
234-
assert connection == characteristic._indicate_connection
235-
characteristic._indicate_status = status
236-
characteristic._indicate_event.set()
237-
234+
if connection == characteristic._indicate_connection:
235+
characteristic._indicate_status = status
236+
characteristic._indicate_event.set()
237+
else:
238+
log_warn("Received indication for unexpected connection")
238239

239240
class BufferedCharacteristic(Characteristic):
240241
def __init__(self, service, uuid, max_len=20, append=False):

0 commit comments

Comments
 (0)
0