commit 6bad235
default
·
2023-05-08 07:17:00 +0000 UTC
parent e2e7bc2
Moved sem_close() further to the end.
1 files changed,
+2,
-4
M
httpd.c
M
httpd.c
+2,
-4
1@@ -354,10 +354,6 @@ void job_wait(xs_val **job)
2 /* unlock the mutex */
3 pthread_mutex_unlock(&job_mutex);
4 }
5-
6- if (!*job) {
7- sem_close(job_sem);
8- }
9 }
10
11
12@@ -568,5 +564,7 @@ void httpd(void)
13 job_fifo = xs_free(job_fifo);
14 pthread_mutex_unlock(&job_mutex);
15
16+ sem_close(job_sem);
17+
18 srv_log(xs_fmt("httpd stop %s:%d", address, port));
19 }