[core] set one-shot mode fd O_NONBLOCK, FD_CLOEXEC
(thx citaylor) x-ref: https://redmine.lighttpd.net/boards/2/topics/7487personal/stbuehler/mod-csrf
parent
07e57e24c2
commit
c23f8fdd6f
|
@ -516,6 +516,9 @@ static int server_oneshot_init(server *srv, int fd) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*(must set flags; fd did not pass through fdevent accept() logic)*/
|
||||
fdevent_fcntl_set_nb_cloexec(srv->ev, fd);
|
||||
|
||||
if (cnt_addr.plain.sa_family != AF_UNIX) {
|
||||
network_accept_tcp_nagle_disable(fd);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue