Skip to content

Commit 152e0bb

Browse files
authored
Merge pull request #21 from lxb007981/master
Set std_listener to non-blocking mode
2 parents aae462c + 0e3189b commit 152e0bb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/http/tcp_socket.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ impl TcpSocket {
5656
socket.set_reuse_address(true)?;
5757
socket.bind(&tcp_addr.sock_addr.into())?;
5858
socket.listen(128)?;
59+
socket.set_nonblocking(true)?;
5960
let tcp_listener = TcpListener::from_std(socket.into())?;
6061
Ok(tcp_listener)
6162
}

0 commit comments

Comments
 (0)