From fa387d0e59a9fc169990a7a1cfbc7dff4ef9ad07 Mon Sep 17 00:00:00 2001 From: Gabi Date: Tue, 19 Mar 2024 23:05:07 -0300 Subject: [PATCH] fix(connlib): remove outdated assertion due to possibility of network changes (#4222) found while working on #4163 --- rust/connlib/snownet/src/allocation.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/rust/connlib/snownet/src/allocation.rs b/rust/connlib/snownet/src/allocation.rs index 2d749f625..d660d4f83 100644 --- a/rust/connlib/snownet/src/allocation.rs +++ b/rust/connlib/snownet/src/allocation.rs @@ -961,12 +961,9 @@ impl ChannelBindings { } fn handle_failed_binding(&mut self, c: u16) { - let Some(channel) = self.inner.remove(&c) else { + if self.inner.remove(&c).is_none() { debug_assert!(false, "No channel binding for {c}"); - return; - }; - - debug_assert!(!channel.bound, "Channel should not yet be bound") + } } fn set_confirmed(&mut self, c: u16, now: Instant) -> bool {