aioble/security: Only schedule save when needed.

Was getting occasional: RuntimeError: schedule queue full
pull/462/head
Andrew Leech 2021-09-23 14:42:37 +10:00
rodzic 5b496e944e
commit 75997117e4
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -106,6 +106,7 @@ def _security_irq(event, data):
_secrets[key] = value
# Queue up a save (don't synchronously write to flash).
if not _modified:
_modified = True
schedule(_save_secrets, None)