提交 f3e623b3 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Fix "newconsumer" event.

上级 c748af2f
......@@ -655,11 +655,6 @@ class Peer extends EnhancedEventEmitter
this._sendNotification(method, data2);
});
if (notifyClient)
this._sendNotification('newConsumer', consumer.toJson());
this.safeEmit('newconsumer', consumer);
this._channel.request('router.createConsumer', internal,
{
kind : consumer.kind
......@@ -674,6 +669,11 @@ class Peer extends EnhancedEventEmitter
throw error;
});
this.safeEmit('newconsumer', consumer);
if (notifyClient)
this._sendNotification('newConsumer', consumer.toJson());
}
_sendNotification(method, data)
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论