Skip to content

Commit 7599711

Browse files
committed
aioble/security: Only schedule save when needed.
Was getting occasional: RuntimeError: schedule queue full
1 parent 5b496e9 commit 7599711

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

micropython/bluetooth/aioble/aioble/security.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ def _security_irq(event, data):
106106
_secrets[key] = value
107107

108108
# Queue up a save (don't synchronously write to flash).
109-
_modified = True
110-
schedule(_save_secrets, None)
109+
if not _modified:
110+
_modified = True
111+
schedule(_save_secrets, None)
111112

112113
return True
113114

0 commit comments

Comments
 (0)