mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
fix(relay): only unbind a channel if it is actually bound (#4495)
Currently, we are emitting the "Channel is now expired" message multiple times because we don't filter for the ones we have already unbound.
This commit is contained in:
@@ -460,7 +460,7 @@ where
|
||||
for ((client, number), channel) in self
|
||||
.channels_by_client_and_number
|
||||
.iter_mut()
|
||||
.filter(|(_, c)| c.is_expired(now))
|
||||
.filter(|(_, c)| c.is_expired(now) && c.bound)
|
||||
{
|
||||
tracing::info!(target: "relay", channel = %number, %client, peer = %channel.peer_address, allocation = %channel.allocation, "Channel is now expired");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user