summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 79e53b4)
raw | patch | inline | side by side (parent: 79e53b4)
author | Sebastian Harl <sh@tokkee.org> | |
Tue, 12 Dec 2006 09:50:12 +0000 (10:50 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Wed, 13 Dec 2006 07:01:08 +0000 (08:01 +0100) |
If the socket is closed before the thread is terminated it might cause some
confusing error messages if the thread wants to read from the socket.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
confusing error messages if the thread wants to read from the socket.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
src/email.c | patch | blob | history |
diff --git a/src/email.c b/src/email.c
index 377a6b1ea6a5c6faac4fb3462b60fe6f8731e95c..0f9c2f3de016f521b62a2ebfbdd0aaa3a4eb84c9 100644 (file)
--- a/src/email.c
+++ b/src/email.c
if (disabled)
return;
- close (connector_socket);
pthread_kill (connector, SIGTERM);
+ close (connector_socket);
/* don't allow any more connections to be processed */
pthread_mutex_lock (&conns_mutex);
for (i = 0; i < max_conns; ++i) {
- close (collectors[i]->socket);
pthread_kill (collectors[i]->thread, SIGTERM);
+ close (collectors[i]->socket);
}
pthread_mutex_unlock (&conns_mutex);