snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 6bad2355ef8d7a4013a73888416c8a90e6b6dab0
parent e2e7bc2d713e469d5af61f58dc85c063bba94e42
Author: default <nobody@localhost>
Date:   Mon,  8 May 2023 09:17:00 +0200

Moved sem_close() further to the end.

Diffstat:
Mhttpd.c | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/httpd.c b/httpd.c @@ -354,10 +354,6 @@ void job_wait(xs_val **job) /* unlock the mutex */ pthread_mutex_unlock(&job_mutex); } - - if (!*job) { - sem_close(job_sem); - } } @@ -568,5 +564,7 @@ void httpd(void) job_fifo = xs_free(job_fifo); pthread_mutex_unlock(&job_mutex); + sem_close(job_sem); + srv_log(xs_fmt("httpd stop %s:%d", address, port)); }