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

Probably fix the issue in which the mediasoup-worker process sometimes remains…

Probably fix the issue in which the mediasoup-worker process sometimes remains alive once the main process dies.
上级 4b51a47e
...@@ -97,11 +97,7 @@ class Worker extends EventEmitter ...@@ -97,11 +97,7 @@ class Worker extends EventEmitter
// Close every Room // Close every Room
this._rooms.forEach((room) => room.close(undefined, true)); this._rooms.forEach((room) => room.close(undefined, true));
// Kill mediasoup-worker process (let it some time so previous // Kill mediasoup-worker process
// requests are properly sent and replied)
setTimeout(() =>
{
// Kill child
if (this._child) if (this._child)
{ {
// Remove event listeners but leave a fake 'error' hander // Remove event listeners but leave a fake 'error' hander
...@@ -116,7 +112,6 @@ class Worker extends EventEmitter ...@@ -116,7 +112,6 @@ class Worker extends EventEmitter
// Close the Channel instance // Close the Channel instance
this._channel.close(); this._channel.close();
}, 100);
this.emit('close', error); this.emit('close', error);
} }
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论