mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 11:15:35 -05:00
fix: also make server socket nonblocking
This commit is contained in:
parent
cf9c14b1c2
commit
e199162e1f
1 changed files with 1 additions and 1 deletions
|
|
@ -122,7 +122,7 @@ let to_tcp_server (self : t) : IO.TCP_server.builder =
|
|||
let fd = Fd.create sock in
|
||||
fd, true (* Because we're creating the socket ourselves *)
|
||||
in
|
||||
MIO.Unix.clear_nonblock sock;
|
||||
MIO.Unix.set_nonblock sock;
|
||||
MIO.Unix.setsockopt_optint sock Unix.SO_LINGER None;
|
||||
if should_bind then (
|
||||
let inet_addr = Unix.inet_addr_of_string self.addr in
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue