summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2023-05-08 09:17:00 +0200
committerGravatar default2023-05-08 09:17:00 +0200
commit6bad2355ef8d7a4013a73888416c8a90e6b6dab0 (patch)
treee978e3bde2d4d5adede5aadd1e65d55e21bc1a4f
parentAdded a source (web, mastoapi, etc) to lastlog_write(). (diff)
downloadpenes-snac2-6bad2355ef8d7a4013a73888416c8a90e6b6dab0.tar.gz
penes-snac2-6bad2355ef8d7a4013a73888416c8a90e6b6dab0.tar.xz
penes-snac2-6bad2355ef8d7a4013a73888416c8a90e6b6dab0.zip
Moved sem_close() further to the end.
-rw-r--r--httpd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/httpd.c b/httpd.c
index 334d73d..e8223f5 100644
--- a/httpd.c
+++ b/httpd.c
@@ -354,10 +354,6 @@ void job_wait(xs_val **job)
354 /* unlock the mutex */ 354 /* unlock the mutex */
355 pthread_mutex_unlock(&job_mutex); 355 pthread_mutex_unlock(&job_mutex);
356 } 356 }
357
358 if (!*job) {
359 sem_close(job_sem);
360 }
361} 357}
362 358
363 359
@@ -568,5 +564,7 @@ void httpd(void)
568 job_fifo = xs_free(job_fifo); 564 job_fifo = xs_free(job_fifo);
569 pthread_mutex_unlock(&job_mutex); 565 pthread_mutex_unlock(&job_mutex);
570 566
567 sem_close(job_sem);
568
571 srv_log(xs_fmt("httpd stop %s:%d", address, port)); 569 srv_log(xs_fmt("httpd stop %s:%d", address, port));
572} 570}