function cleaner() {
  setTimeout(() => {
    if (ids.length < 1) { return; }
    ActiveRooms.forEach((element, index) => {
      element.Players.forEach((element2, index2) => {
        if (!ids.includes(element2.Id)) {
          ActiveRooms[index].Players.splice(index2, 1);
          ActiveRooms[index].Players.forEach((element3) => {
            element3.socket.emit('UserLeave', JSON.stringify({ RoomId: element.Id, UserLeaved: element2.Id }));
          });
        }
      });
    });
    ActiveRooms.forEach((element, index) => {
      if (element.Players.length === 0) {
        ActiveRooms.splice(index, 1);
      }
    });
    // ids = [];
  }, 5000);
}
Authenticating a user, or otherwise establishing a new user session, without invalidating any existing session identifier gives an attacker the opportunity to steal authenticated sessions.