stun actor: add back log message to inform of autodiscovery result
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Alex 2024-01-16 15:51:36 +01:00
parent 6613ea347d
commit 843104dad7

View file

@ -120,6 +120,16 @@ impl StunAutodiscovery {
address: discovered_addr, address: discovered_addr,
}; };
let msg = format!(
"STUN autodiscovery result: {} -> {:?}",
self.consul_key, discovered_addr
);
if self.last_result.as_ref().and_then(|x| x.address) != discovered_addr {
info!("{}", msg);
} else {
debug!("{}", msg);
}
consul consul
.kv_put(&self.consul_key, serde_json::to_vec(&current_result)?) .kv_put(&self.consul_key, serde_json::to_vec(&current_result)?)
.await?; .await?;