summaryrefslogtreecommitdiff
path: root/res/res_pjsip.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/res_pjsip.c')
-rw-r--r--res/res_pjsip.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index c446dee57..afc383225 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -3310,7 +3310,11 @@ static int load_module(void)
static int reload_module(void)
{
- if (ast_sip_push_task(NULL, reload_configuration_task, NULL)) {
+ /*
+ * We must wait for the reload to complete so multiple
+ * reloads cannot happen at the same time.
+ */
+ if (ast_sip_push_task_synchronous(NULL, reload_configuration_task, NULL)) {
ast_log(LOG_WARNING, "Failed to reload PJSIP\n");
return -1;
}