fix(password): sync config, check equal

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2026-03-22 19:05:04 +08:00
parent 71be0dcd8d
commit fc9d521f0b

View File

@@ -1573,6 +1573,9 @@ impl Config {
// This matches historical behavior, but may need revisiting in a separate PR.
pub fn set(cfg: Config) -> bool {
let mut lock = CONFIG.write().unwrap();
if *lock == cfg {
return false;
}
*lock = cfg;
lock.store();
// Drop CONFIG lock before acquiring KEY_PAIR lock to avoid potential deadlock.