Hi there,
I have some issue with server side event "roomLeave" and I hope you can help me solve it.
Here is the use case:
I am processing on the server side "roomJoin" & "roomLeave" events and manage room participants as room field array, meaning:
- on 'roomJoin' each new room occupants has been added to the room array
- on 'roomLeave' each leaving room occupants has been removed from the room array. When all room participants left the room, it is deleted.
then on the client side via roomListener it is quite easy for me to manage connection relations based on their presence into the room. So far, so good.
It appears however, that sometimes when the connection is not properly closed (for instance, instead of leaving the room, the user just close the web browser), 'roomLeave' event is not fired for particular user and the connection stayed into the room, but it is no longer valid (easyrtcId is not valid). The connection however prevents deleting the room, which breaks some application internal logic. For instance since I have reserved room names (stored persistently), when room owner re-enters the room it is not expected to find invalid connections / occupants inside the room...
So what I actually need is some kind of "garbage collector" for already invalid room occupants...
any ideas how to create re-use some will be greatly appreciated.
Regards,
Angel