mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
Moved sem_close() further to the end.
This commit is contained in:
parent
e2e7bc2d71
commit
6bad2355ef
1 changed files with 2 additions and 4 deletions
6
httpd.c
6
httpd.c
|
@ -354,10 +354,6 @@ void job_wait(xs_val **job)
|
||||||
/* unlock the mutex */
|
/* unlock the mutex */
|
||||||
pthread_mutex_unlock(&job_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);
|
job_fifo = xs_free(job_fifo);
|
||||||
pthread_mutex_unlock(&job_mutex);
|
pthread_mutex_unlock(&job_mutex);
|
||||||
|
|
||||||
|
sem_close(job_sem);
|
||||||
|
|
||||||
srv_log(xs_fmt("httpd stop %s:%d", address, port));
|
srv_log(xs_fmt("httpd stop %s:%d", address, port));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue