@mulingai-npm/redis 3.40.16 → 3.40.18

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.
@@ -21,6 +21,13 @@ export declare class MulingstreamSpeakerManager {
21
21
  private buildLockKey;
22
22
  acquireRoomLock(roomId: string, socketId: string, ttl?: number): Promise<boolean>;
23
23
  releaseRoomLock(roomId: string, socketId: string): Promise<void>;
24
+ /**
25
+ * Force-delete the room lock regardless of which socket owns it. Used by the
26
+ * speaker-joining recovery path when the lock is orphaned (no speaker records
27
+ * exist for the room but the lock key remains because the previous process
28
+ * crashed after SETNX and before addSpeaker).
29
+ */
30
+ forceReleaseRoomLock(roomId: string): Promise<void>;
24
31
  private parseHash;
25
32
  private serialize;
26
33
  private buildId;
@@ -20,6 +20,15 @@ class MulingstreamSpeakerManager {
20
20
  await this.redisClient.del(lockKey);
21
21
  }
22
22
  }
23
+ /**
24
+ * Force-delete the room lock regardless of which socket owns it. Used by the
25
+ * speaker-joining recovery path when the lock is orphaned (no speaker records
26
+ * exist for the room but the lock key remains because the previous process
27
+ * crashed after SETNX and before addSpeaker).
28
+ */
29
+ async forceReleaseRoomLock(roomId) {
30
+ await this.redisClient.del(this.buildLockKey(roomId));
31
+ }
23
32
  parseHash(hash) {
24
33
  return {
25
34
  speakerId: hash.speakerId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mulingai-npm/redis",
3
- "version": "3.40.16",
3
+ "version": "3.40.18",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": {