recreate udp socket
This commit is contained in:
parent
9103fd3328
commit
619fba5838
1 changed files with 5 additions and 1 deletions
|
|
@ -211,7 +211,11 @@ impl RendezvousMediator {
|
|||
Config::update_latency(&host, -1);
|
||||
old_latency = 0;
|
||||
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;
|
||||
}
|
||||
} else if fails > MAX_FAILS1 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue