_disposeIfEmpty not trigger the onDispose callback

16 Oct 2018, 10:09

Hi all, I wonder how to do some logic when there is no clients in room. I trying to set the autoDispose of the room to false but how do I dispose the room? And I call protected _disposeIfEmpty but the onDispose not triggered.
Update
Can I use this.emit('dispose'); to dispose the room mannually?

16 Oct 2018, 10:25
This post is deleted!
16 Oct 2018, 15:39

Hi @amit-gshe, welcome!

Have you tried this.emit('dispose')? It should work as you expect!

17 Oct 2018, 02:18

@endel Thanks for your response. It works as I expect.