fix(password): sync config, check equal
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
1 parent
71be0dcd8d
commit
fc9d521f0b
1 file changed
+3
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user