Add sync check for unallocated_bridges in lox-library
This commit is contained in:
parent
76bb8757f5
commit
8e08adbdb0
|
@ -511,6 +511,17 @@ impl BridgeAuth {
|
|||
return res;
|
||||
}
|
||||
}
|
||||
// Also check the unallocated bridges just in case there is a bridge that should be updated there
|
||||
let unallocated_bridges = self.bridge_table.unallocated_bridges.clone();
|
||||
for (i, unallocated_bridge) in unallocated_bridges.iter().enumerate() {
|
||||
if unallocated_bridge.uid_fingerprint == bridge.uid_fingerprint {
|
||||
// Now we must remove the old bridge from the unallocated bridges and insert the new bridge
|
||||
// in its place
|
||||
self.bridge_table.unallocated_bridges.remove(i);
|
||||
self.bridge_table.unallocated_bridges.push(*bridge);
|
||||
res = true;
|
||||
}
|
||||
}
|
||||
// If this is returned, we assume that the bridge wasn't found in the bridge table
|
||||
// and therefore should be treated as a "new bridge"
|
||||
res
|
||||
|
|
Loading…
Reference in New Issue