Skip to content

Commit d42ff50

Browse files
authored
Merge pull request #69 from hyperlight-dev/fix/windows-connect-timeout
fix: avoid try_clone in net_connect to fix Windows DNS resolution
2 parents 52a28ce + ac8fd6f commit d42ff50

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

host/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,10 +1237,8 @@ fn handle_net_connect(
12371237
let addr = parse_sockaddr(args)?;
12381238
policy.check(&addr)?;
12391239
let sa: SockAddr = addr.into();
1240-
let sock = {
1241-
let tbl = table.lock().unwrap();
1242-
tbl.get_socket(fd)?.try_clone()?
1243-
};
1240+
let tbl = table.lock().unwrap();
1241+
let sock = tbl.get_socket(fd)?;
12441242
sock.connect_timeout(&sa, SOCKET_TIMEOUT)?;
12451243
Ok(json!({}))
12461244
}

0 commit comments

Comments
 (0)