Skip to content

Instantly share code, notes, and snippets.

@davehorton
Created August 24, 2022 16:24
Show Gist options
  • Select an option

  • Save davehorton/d5bb609ce2bef19c680c8de8f92a560d to your computer and use it in GitHub Desktop.

Select an option

Save davehorton/d5bb609ce2bef19c680c8de8f92a560d to your computer and use it in GitHub Desktop.
fix race condition in conference with waitHook
diff --git a/lib/tasks/conference.js b/lib/tasks/conference.js
index 655706f..2132a63 100644
--- a/lib/tasks/conference.js
+++ b/lib/tasks/conference.js
@@ -541,6 +541,9 @@ class Conference extends Task {
}
this.logger.debug(`Conference:_playHook: executing ${tasks.length} tasks`);
+ /* we might have been killed while off fetching waitHook */
+ if (this.killed) return [];
+
if (tasks.length > 0) {
this._playSession = new ConfirmCallSession({
logger: this.logger,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment