revert some changes to regain stability

This commit is contained in:
schlagmichdoch 2023-03-06 03:36:46 +01:00
parent c3863a9dd3
commit edf2ab5eb3
3 changed files with 12 additions and 20 deletions

View file

@ -368,6 +368,10 @@ class PairDropServer {
// delete the peer
delete this._rooms[room][peer.id];
if (roomType === 'ip') {
peer.socket.terminate();
}
//if room is empty, delete the room
if (!Object.keys(this._rooms[room]).length) {
delete this._rooms[room];