aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-01-16 15:51:36 +0100
committerAlex Auvolat <alex@adnab.me>2024-01-16 15:51:36 +0100
commit843104dad73bfdebb674d3c3ec82af225c20c493 (patch)
tree95203aa3d3e3845109d4e269f8627aec88b14166 /src
parent6613ea347dc1ff946e7b4c0d39617679ff1b903a (diff)
downloaddiplonat-843104dad73bfdebb674d3c3ec82af225c20c493.tar.gz
diplonat-843104dad73bfdebb674d3c3ec82af225c20c493.zip
stun actor: add back log message to inform of autodiscovery resultdocker-7stun-keep-values
Diffstat (limited to 'src')
-rw-r--r--src/stun_actor.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/stun_actor.rs b/src/stun_actor.rs
index 4cca4f1..bf4da73 100644
--- a/src/stun_actor.rs
+++ b/src/stun_actor.rs
@@ -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?;