diff options
author | Stef Walter <stef@memberwebs.com> | 2004-09-07 16:54:14 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-09-07 16:54:14 +0000 |
commit | 11707e4be5b8cef1caf6ee2604c41368056afc81 (patch) | |
tree | f29693da2c94f3db2caba3b96eacd5bda96b0cff /src | |
parent | e24fbacde6bbe2ef037ae663351303f66febc626 (diff) |
Don't quit when can't create thread.
Diffstat (limited to 'src')
-rw-r--r-- | src/clamsmtpd.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/clamsmtpd.c b/src/clamsmtpd.c index 85b9a14..4c08919 100644 --- a/src/clamsmtpd.c +++ b/src/clamsmtpd.c @@ -502,9 +502,17 @@ static void connection_loop(int sock) (void*)(threads + i)); if(r != 0) { + threads[i].fd = -1; + threads[i].tid = 0; + errno = r; - message(NULL, LOG_ERR, "couldn't create thread"); - ((clstate_t*)g_state)->quit = 1; + message(NULL, LOG_ERR, "couldn't create thread for connection"); + write(fd, SMTP_STARTFAILED, KL(SMTP_STARTFAILED)); + + shutdown(fd, SHUT_RDWR); + close(fd); + fd = -1; + break; } |