diff options
| author | Mr. Goblin <mrgoblin@mrgoblin.net> | 2026-09-30 17:28:51 +0300 |
|---|---|---|
| committer | Mr. Goblin <mrgoblin@mrgoblin.net> | 2026-09-30 17:28:51 +0300 |
| commit | ec49f04faa8a4f643eb8bb4a8c75ac2bff92a8f8 (patch) | |
| tree | cf925dfdbc9e8811e42e8f0c9231c2937d9cbca0 | |
| parent | edd5b33da60f30aa70e0bee4ba877cb3c5c84672 (diff) | |
fixed critical bug on handle_accept()
| -rw-r--r-- | btasktd.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; } |
