aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_unistim.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_unistim.c')
-rw-r--r--channels/chan_unistim.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
index d4cb0f347..a6742b5f4 100644
--- a/channels/chan_unistim.c
+++ b/channels/chan_unistim.c
@@ -4591,6 +4591,7 @@ static void *do_monitor(void *data)
ast_verbose(VERBOSE_PREFIX_1 "Reloading unistim.conf...\n");
reload_config();
}
+ pthread_testcancel();
}
/* Never reached */
return NULL;
@@ -4617,7 +4618,7 @@ static int restart_monitor(void)
pthread_kill(monitor_thread, SIGURG);
} else {
pthread_attr_init(&attr);
- pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
/* Start a new monitor */
if (ast_pthread_create(&monitor_thread, &attr, do_monitor, NULL) < 0) {
ast_mutex_unlock(&monlock);