Hi,
Sometimes in the room occupant listener, function roomOccupantListener:function(roomName, occupants, isPrimary) ,
in the occupants list, some entries comes who are no longer connected to the server.
Even after 2 to 3 days, these entries are not cleared up.
My function body is simple:
for (var oldPeer in peers) {
if (!occupants[oldPeer]) {
removeIfPresent(oldPeer);
delete peers[oldPeer];
}
}
for (var easyrtcid in occupants) {
if (!peers[easyrtcid]) {
addNewUser(easyrtcid, info);
peers[easyrtcid] = true;
}
}
The problem seems to be, the occupants variable, even though I may join a room after 2 or 3 days, somehow has some entries who have long disconnected from the server (maybe through a browser crash, or maybe browser close).
I would be very much obliged if anybody can tell me what can be the reason behind the easyrtc nodejs server (which uses a websocket server), does not eliminate these invalid entries some of the time.
*In my case, specially in testing phase, it may occasionally happen that just after sending a message, the user closes browser window (or his browser may crash)
Thanks in advance,
Ataul Mukit
Rational Technologies Ltd.
Dhaka, Bangladesh