@colyseus/core 0.18.19 → 0.18.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/Room.mjs CHANGED
@@ -1203,6 +1203,7 @@ var Room = class _Room {
1203
1203
  this._reservedSeatTimeouts[sessionId] = setTimeout(() => reconnection.reject(false), seconds * 1e3);
1204
1204
  }
1205
1205
  const cleanup = () => {
1206
+ clearTimeout(this._reservedSeatTimeouts[sessionId]);
1206
1207
  delete this._reconnections[reconnectionToken];
1207
1208
  delete this._reservedSeats[sessionId];
1208
1209
  delete this._reservedSeatTimeouts[sessionId];
@@ -1215,7 +1216,6 @@ var Room = class _Room {
1215
1216
  previousClient.state = ClientState.RECONNECTED;
1216
1217
  previousClient.ref = newClient.ref;
1217
1218
  previousClient.reconnectionToken = newClient.reconnectionToken;
1218
- clearTimeout(this._reservedSeatTimeouts[sessionId]);
1219
1219
  }, () => {
1220
1220
  this.resetAutoDisposeTimeout();
1221
1221
  }).finally(() => {
@@ -1381,6 +1381,9 @@ var Room = class _Room {
1381
1381
  clearTimeout(this._autoDisposeTimeout);
1382
1382
  this._autoDisposeTimeout = void 0;
1383
1383
  }
1384
+ for (const sessionId in this._reservedSeatTimeouts) {
1385
+ clearTimeout(this._reservedSeatTimeouts[sessionId]);
1386
+ }
1384
1387
  this.clock.clear();
1385
1388
  this.clock.stop();
1386
1389
  this._inputController?.dispose();