提交 5f96f669 authored 作者: Chad Phillips's avatar Chad Phillips

FS-11281: Verto.newCall dialog callback overrides should be set before invite

Verto.newCall() permits passing custom callback functions per call that
override the default dialog callbacks inherited from the Verto object.
However, they are currently set after calling the invite() function, and it's
possible that some of these callbacks could be called during the invite()
function's execution.

To avoid a race condition, move setting these custom callbacks on the dialog
to happen before calling invite().
上级 d5af9296
...@@ -465,12 +465,12 @@ ...@@ -465,12 +465,12 @@
var dialog = new $.verto.dialog($.verto.enum.direction.outbound, this, args); var dialog = new $.verto.dialog($.verto.enum.direction.outbound, this, args);
dialog.invite();
if (callbacks) { if (callbacks) {
dialog.callbacks = callbacks; dialog.callbacks = callbacks;
} }
dialog.invite();
return dialog; return dialog;
}; };
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论