res_stasis: fix intermittent delays on adding channel to bridge

Previously, on command execution, the control thread was awoken by
sending a SIGURG. It was found that this still resulted in some
instances where the thread was not immediately awoken.

This change instead sends a null frame to awaken the control thread,
which awakens the thread more consistently.

Resolves: #801
(cherry picked from commit 11effc785a)
This commit is contained in:
Mike Bradeen
2024-07-10 12:58:44 -06:00
committed by Asterisk Development Team
parent 047913265b
commit 7a2459e13f
3 changed files with 4 additions and 30 deletions

View File

@@ -1548,11 +1548,7 @@ int stasis_app_exec(struct ast_channel *chan, const char *app_name, int argc,
continue;
}
/* Set this thread's id as the control thread id so that any
new commands can signal out of this wait */
control_set_thread(control, pthread_self());
r = ast_waitfor(chan, MAX_WAIT_MS);
control_set_thread(control, AST_PTHREADT_NULL);
if (r < 0) {
ast_debug(3, "%s: Poll error\n",