aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/worker_queue.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/worker_queue.c b/src/worker_queue.c
index 3e207e3..06119e2 100644
--- a/src/worker_queue.c
+++ b/src/worker_queue.c
@@ -11,6 +11,7 @@
#include <pthread.h>
#include <stdlib.h>
#include <sys/queue.h>
+#include <unistd.h>
struct worker {
pthread_t thread;
@@ -37,6 +38,7 @@ void worker_destroy(struct worker *entry)
{
log("Waiting for worker %d thread to exit\n", entry->fd);
pthread_errno_if(pthread_join(entry->thread, NULL), "pthread_join");
+ log_errno_if(close(entry->fd), "close");
free(entry);
}