Skip to content

Commit

Permalink
fix state hashing
Browse files Browse the repository at this point in the history
  • Loading branch information
Geal authored and FlorentinDUBOIS committed Jul 13, 2022
1 parent c5b9bfa commit 5729d5f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions command/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,12 @@ impl ConfigState {
let mut s = DefaultHasher::new();
self.clusters.get(cluster_id).hash(&mut s);
self.backends.get(cluster_id).map(|ref v| v.iter().collect::<BTreeSet<_>>().hash(&mut s));
self.http_fronts.values().filter(|f| f.route == Route::ClusterId(cluster_id.to_string())).map(|ref v| v.hash(&mut s));
self.https_fronts.values().filter(|f| f.route == Route::ClusterId(cluster_id.to_string())).map(|ref v| v.hash(&mut s));
for v in self.http_fronts.values().filter(|f| f.route == Route::ClusterId(cluster_id.to_string())) {
v.hash(&mut s);
}
for v in self.https_fronts.values().filter(|f| f.route == Route::ClusterId(cluster_id.to_string())) {
v.hash(&mut s);
}
self.tcp_fronts.get(cluster_id).map(|ref v| v.iter().collect::<BTreeSet<_>>().hash(&mut s));

(cluster_id.to_string(), s.finish())
Expand Down

0 comments on commit 5729d5f

Please sign in to comment.