summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/thread.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/thread.c b/src/thread.c
index 66f13d9..4ea1bbf 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -1,4 +1,4 @@
-/* $Id: thread.c,v 1.18 2001-11-22 00:31:10 rjkaes Exp $
+/* $Id: thread.c,v 1.19 2001-12-28 22:29:11 rjkaes Exp $
*
* Handles the creation/destruction of the various threads required for
* processing incoming connections.
@@ -131,6 +131,15 @@ thread_main(void *arg)
connfd = accept(listenfd, cliaddr, &clilen);
pthread_mutex_unlock(&mlock);
+ /*
+ * Make sure no error occurred...
+ */
+ if (connfd < 0) {
+ log_message(LOG_ERR, "Accept returned an error (%s) ... retrying.", strerror(errno));
+ continue;
+ }
+
+
ptr->status = T_CONNECTED;
SERVER_DEC();