Skip to content

Commit 8735036

Browse files
romanmichalvasko
authored andcommitted
session server BUGFIX call pthread_detach
1 parent b95bbf1 commit 8735036

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/session_server.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3864,9 +3864,11 @@ nc_server_notif_cert_expiration_thread_stop(int wait)
38643864
pthread_mutex_unlock(&server_opts.cert_exp_notif.lock);
38653865
if (wait) {
38663866
r = pthread_join(tid, NULL);
3867-
if (r) {
3868-
ERR(NULL, "Joining the certificate expiration notification thread failed (%s).", strerror(r));
3869-
}
3867+
} else {
3868+
r = pthread_detach(tid);
3869+
}
3870+
if (r) {
3871+
ERR(NULL, "Stopping the certificate expiration notification thread failed (%s).", strerror(r));
38703872
}
38713873
} else {
38723874
/* thread is not running */

0 commit comments

Comments
 (0)