Skip to content

Commit

Permalink
Merge branch 'master' into username-validate-prod
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Feb 7, 2024
2 parents bfafbfd + 5aa052b commit a72d14a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/RoomList.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const JANITOR_INTERVAL = 1000 * 60;
/** Time a room must be empty for before it may be removed by the janitor. */
const JANITOR_THRESHOLD = 1000 * 60 * 60;
/** Maximum amount of rooms that can exist at once. Empty rooms are included in this limit. */
const MAX_ROOMS = 1024;
const MAX_ROOMS = 16384;

/**
* @typedef {import('./Room').RoomID} RoomID
Expand Down Expand Up @@ -65,7 +65,7 @@ class RoomList {
create(id) {
if (this.rooms.size >= this.maxRooms) {
// TODO: it may be worthwhile to call janitor() and check again
throw new ConnectionError(ConnectionError.Overloaded, 'Too many rooms');
throw new ConnectionError(ConnectionError.Overloaded, `Too many rooms to fit ${id}`);
}
if (this.has(id)) {
throw new Error('Room already exists');
Expand Down

0 comments on commit a72d14a

Please sign in to comment.