Skip to content

Commit

Permalink
session server BUGFIX call pthread_detach
Browse files Browse the repository at this point in the history
  • Loading branch information
roman committed Aug 12, 2024
1 parent 7876254 commit 901446d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/session_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -3841,9 +3841,11 @@ nc_server_notif_cert_expiration_thread_stop(int wait)
pthread_mutex_unlock(&server_opts.cert_exp_notif.lock);
if (wait) {
r = pthread_join(tid, NULL);
if (r) {
ERR(NULL, "Joining the certificate expiration notification thread failed (%s).", strerror(r));
}
} else {
r = pthread_detach(tid);
}
if (r) {
ERR(NULL, "Stopping the certificate expiration notification thread failed (%s).", strerror(r));
}
} else {
/* thread is not running */
Expand Down

0 comments on commit 901446d

Please sign in to comment.