projects
/
darkstat
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0586015
)
Set the listening socket non-blocking before we accept() on it.
author
Emil Mikulic
<emikulic@gmail.com>
Sun, 8 Jul 2012 11:41:10 +0000
(21:41 +1000)
committer
Emil Mikulic
<emikulic@gmail.com>
Tue, 6 Aug 2013 08:31:08 +0000
(18:31 +1000)
This has not come up as a problem before, but it's a good idea.
http.c
patch
|
blob
|
history
diff --git
a/http.c
b/http.c
index
add1031
..
b8744e5
100644
(file)
--- a/
http.c
+++ b/
http.c
@@
-931,6
+931,8
@@
static void http_listen_one(struct addrinfo *ai,
return;
}
+ fd_set_nonblock(sockin);
+
/* reuse address */
sockopt = 1;
if (setsockopt(sockin, SOL_SOCKET, SO_REUSEADDR,