parent
f7df6bab01
commit
6d26385ba3
|
@ -616,7 +616,7 @@ fn fetch(
|
||||||
Err(e) => return Err(e.into()),
|
Err(e) => return Err(e.into()),
|
||||||
_ => {},
|
_ => {},
|
||||||
}
|
}
|
||||||
log::debug!("reported candidates: {:?}", candidates);
|
log::debug!("candidates successfully reported");
|
||||||
|
|
||||||
if nat.no_nat_traversal {
|
if nat.no_nat_traversal {
|
||||||
log::debug!("NAT traversal explicitly disabled, not attempting.");
|
log::debug!("NAT traversal explicitly disabled, not attempting.");
|
||||||
|
|
|
@ -648,6 +648,7 @@ impl<'a> PeerDiff<'a> {
|
||||||
.map(|info| info.is_recently_connected())
|
.map(|info| info.is_recently_connected())
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
{
|
{
|
||||||
|
let mut endpoint_changed = false;
|
||||||
let resolved = new.endpoint.as_ref().and_then(|e| e.resolve().ok());
|
let resolved = new.endpoint.as_ref().and_then(|e| e.resolve().ok());
|
||||||
if let Some(addr) = resolved {
|
if let Some(addr) = resolved {
|
||||||
if old.is_none() || matches!(old, Some(old) if old.endpoint != resolved) {
|
if old.is_none() || matches!(old, Some(old) if old.endpoint != resolved) {
|
||||||
|
@ -657,9 +658,18 @@ impl<'a> PeerDiff<'a> {
|
||||||
old.and_then(|p| p.endpoint),
|
old.and_then(|p| p.endpoint),
|
||||||
Some(addr),
|
Some(addr),
|
||||||
));
|
));
|
||||||
|
endpoint_changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if !endpoint_changed && !new.candidates.is_empty() {
|
||||||
|
changes.push(ChangeString::new(
|
||||||
|
"Connection status",
|
||||||
|
"Disconnected".into(),
|
||||||
|
"NAT traverse reattempt".into(),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if !changes.is_empty() {
|
if !changes.is_empty() {
|
||||||
Some((builder, changes))
|
Some((builder, changes))
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue