Open ghost opened 5 years ago
Seems like a bug. However I need to test and reproduce it. Hopefully next updates will fix it. Regards
I get a bug in the following way:
startCheckingForOwnerOpenRoom ()
function startCheckingForOwnerOpenRoom() {
connection.checkPresence(roomid, function(isOwnerOnline) {
if (isOwnerOnline === false) {
connection.close();
connection.closeSocket();
connection.userid = roomid;
connection.open(roomid, function(isRoomOpen, error) {
if (isRoomOpen === false) {
console.log('connection.open: isRoomOpen false');
connection.close();
connection.closeSocket();
setTimeout(function() {
startCheckingForOwnerOpenRoom();
}, 1000);
} else {
console.log('connection.open: isRoomOpen true');
}
});
afterConnectingSocket();
//return;
}
setTimeout(startCheckingForOwnerOpenRoom, 2000);
});
}
As a result, connection.userid != roomid
and the Initiator cannot open the room.
There are strange moments in the work of the code. In my case, the initiator has the parameters:
The script is very simple. Initiator refreshes the page. The server closes the room. The admin panel shows that the room is missing.
BUT! If the initiator tries to return and reopen the room, then RTCMultiConnection reports to the console that a user with that name already exists and gives him a new
UserID
. At the same time, the admin panel shows that there are no rooms at all.In my case, only restarting the server
node server.js
or changing the name of the room helps.What could it be? Is this a bug or incorrect server installation?