luaa: close accepted socket on exec
Signed-off-by: Uli Schlachter <psychon@znc.in> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
4722ba6c10
commit
24a506e3c5
5
luaa.c
5
luaa.c
|
@ -1102,6 +1102,11 @@ luaA_conn_cb(EV_P_ ev_io *w, int revents)
|
|||
ev_io *csio_conn = p_new(ev_io, 1);
|
||||
int csfd = accept(w->fd, NULL, NULL);
|
||||
|
||||
if(csfd < 0)
|
||||
return;
|
||||
|
||||
fd_set_close_on_exec(csfd);
|
||||
|
||||
ev_io_init(csio_conn, &luaA_cb, csfd, EV_READ);
|
||||
ev_io_start(EV_DEFAULT_UC_ csio_conn);
|
||||
ev_unref(EV_DEFAULT_UC);
|
||||
|
|
Loading…
Reference in New Issue