diff --git a/micropython/bluetooth/aioble-security/manifest.py b/micropython/bluetooth/aioble-security/manifest.py index 5737d2a06..8a0d68b94 100644 --- a/micropython/bluetooth/aioble-security/manifest.py +++ b/micropython/bluetooth/aioble-security/manifest.py @@ -1,4 +1,4 @@ -metadata(version="0.2.0") +metadata(version="0.2.1") require("aioble-core") diff --git a/micropython/bluetooth/aioble/aioble/security.py b/micropython/bluetooth/aioble/aioble/security.py index 8e04d5b7b..b30681841 100644 --- a/micropython/bluetooth/aioble/aioble/security.py +++ b/micropython/bluetooth/aioble/aioble/security.py @@ -57,10 +57,6 @@ def _save_secrets(arg=None): _path = _path or _DEFAULT_PATH - if not _modified: - # Only save if the secrets changed. - return - with open(_path, "w") as f: # Convert bytes to hex strings (otherwise JSON will treat them like # strings). @@ -106,8 +102,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 diff --git a/micropython/bluetooth/aioble/manifest.py b/micropython/bluetooth/aioble/manifest.py index 1cf06c4d8..1deefdf0e 100644 --- a/micropython/bluetooth/aioble/manifest.py +++ b/micropython/bluetooth/aioble/manifest.py @@ -3,7 +3,7 @@ # code. This allows (for development purposes) all the files to live in the # one directory. -metadata(version="0.6.1") +metadata(version="0.6.2") # Default installation gives you everything. Install the individual # components (or a combination of them) if you want a more minimal install.