mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-04-03 06:26:30 +00:00
fix(password): sync config, check equal
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -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