mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
fix windows related regression in hosted mode run
This commit is contained in:
parent
8440706279
commit
d46fa5a153
1 changed files with 4 additions and 0 deletions
|
|
@ -297,7 +297,11 @@ pub struct Resolver {
|
|||
impl Resolver {
|
||||
pub fn new(xns: &xous_names::XousNames) -> Resolver {
|
||||
let trng = trng::Trng::new(&xns).unwrap();
|
||||
#[cfg(target_os = "windows")]
|
||||
let socket = UdpSocket::bind("0.0.0.0:0").expect("couldn't create socket for DNS resolver");
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
let local_port = (49152 + trng.get_u32().unwrap() % 16384) as u16;
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
let socket = UdpSocket::bind(format!("0.0.0.0:{}", local_port))
|
||||
.expect("couldn't create socket for DNS resolver");
|
||||
let timeout = Duration::from_millis(10_000); // 10 seconds for DNS to resolve by default
|
||||
|
|
|
|||
Loading…
Reference in a new issue