Skip to content

Commit 09457de

Browse files
authored
Merge pull request #8 from DoumanAsh/fix_connect_timeout_win
Unset non-blocking on windows in connect_timeout
2 parents 09b716a + 5b9e00c commit 09457de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sys/windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl Socket {
112112
pub fn connect_timeout(&self, addr: &SockAddr, timeout: Duration) -> io::Result<()> {
113113
self.set_nonblocking(true)?;
114114
let r = self.connect(addr);
115-
self.set_nonblocking(true)?;
115+
self.set_nonblocking(false)?;
116116

117117
match r {
118118
Ok(()) => return Ok(()),

0 commit comments

Comments
 (0)