Unverified Commit 619fba58 authored by RustDesk's avatar RustDesk Committed by GitHub

recreate udp socket

parent 9103fd33
...@@ -211,7 +211,11 @@ impl RendezvousMediator { ...@@ -211,7 +211,11 @@ impl RendezvousMediator {
Config::update_latency(&host, -1); Config::update_latency(&host, -1);
old_latency = 0; old_latency = 0;
if now.duration_since(last_dns_check).map(|d| d.as_millis() as i64).unwrap_or(0) > DNS_INTERVAL { if now.duration_since(last_dns_check).map(|d| d.as_millis() as i64).unwrap_or(0) > DNS_INTERVAL {
allow_err!(rz.dns_check()); if let Ok(_) = rz.dns_check() {
// in some case of network reconnect (dial IP network),
// old UDP socket not work any more after network recover
socket = FramedSocket::new(Config::get_any_listen_addr()).await?;
}
last_dns_check = now; last_dns_check = now;
} }
} else if fails > MAX_FAILS1 { } else if fails > MAX_FAILS1 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment