From 75997117e43acef0894aeadbfda8f781f9bc4b70 Mon Sep 17 00:00:00 2001 From: Andrew Leech Date: Thu, 23 Sep 2021 14:42:37 +1000 Subject: [PATCH] aioble/security: Only schedule save when needed. Was getting occasional: RuntimeError: schedule queue full --- micropython/bluetooth/aioble/aioble/security.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/micropython/bluetooth/aioble/aioble/security.py b/micropython/bluetooth/aioble/aioble/security.py index 8e04d5b7b..9ae9debb4 100644 --- a/micropython/bluetooth/aioble/aioble/security.py +++ b/micropython/bluetooth/aioble/aioble/security.py @@ -106,8 +106,9 @@ def _security_irq(event, data): _secrets[key] = value # Queue up a save (don't synchronously write to flash). - _modified = True - schedule(_save_secrets, None) + if not _modified: + _modified = True + schedule(_save_secrets, None) return True