fix crash when closing queue (potential memory leak as well)

This commit is contained in:
N7Remus 2025-09-29 15:27:41 +02:00
parent b124995666
commit 89114280f0

View file

@ -296,9 +296,12 @@ class Room extends EventEmitter
logger.debug('close()');
this._closed = true;
this._queue.close();
if (this._queue && (typeof this._queue.close === 'function')) {
this._queue.close();
}
if (this._queue && (typeof this._queue.stop === 'function')) {
this._queue.stop();
}
this._queue = null;
if (this._selfDestructTimeout)