summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/app.c b/src/app.c
index ac3d217..0d3afda 100644
--- a/src/app.c
+++ b/src/app.c
@@ -39,6 +39,11 @@ static void front_accept_cb(EV_P_ ev_io *w, int revents) {
if(fd < 0 && (errno == EINTR || errno == EWOULDBLOCK || errno == EAGAIN))
return;
+ if(util_fd_flags(fd, FCGY_NONBLOCK|FCGY_CLOEXEC) < 0) {
+ close(fd);
+ fd = -1;
+ }
+
if(fd < 0) {
fprintf(stderr, "Error accept()'ing: %s.\n", strerror(errno));
ev_io_stop(EV_A_ w);