stun actor: add back log message to inform of autodiscovery result

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,
};
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
.kv_put(&self.consul_key, serde_json::to_vec(&current_result)?)
.await?;