aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--btasktd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/btasktd.c b/btasktd.c
index 82092b2..b8b9fd9 100644
--- a/btasktd.c
+++ b/btasktd.c
@@ -170,6 +170,7 @@ handle_accept(struct btasktd *this)
if (-1 == idx) {
send_response_code(fd, CODE_503_SERVICE_UNAVAILABLE);
close(fd);
+ return;
}
this->users[idx].fd = fd;
this->users[idx].bi = 0;
@@ -387,6 +388,7 @@ main(int argc, char **argv)
if (EINTR == errno) {
/* signal handler called */
if (SIGINT == last_sig) {
+ FD_ZERO(&readfds);
bye_all_clients(&server);
break;
}