Skip to content

Commit

Permalink
fix: lifecycle operation presedence
Browse files Browse the repository at this point in the history
The async-mutex library works as highest value = higher priority. This change
reverses the priority in the lifecycle manager to fix this.
  • Loading branch information
AndyTWF committed Nov 25, 2024
1 parent 5ae54bd commit 8136f0c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/room-lifecycle-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ export interface ContributesToRoomLifecycle extends HandlesDiscontinuity {
/**
* The order of precedence for lifecycle operations, passed to the mutex which allows
* us to ensure that internal operations take precedence over user-driven operations.
*
* The higher the number, the higher the priority.
*/
enum LifecycleOperationPrecedence {
Internal = 0,
Internal = 2,
Release = 1,
AttachOrDetach = 2,
AttachOrDetach = 0,
}

/**
Expand Down

0 comments on commit 8136f0c

Please sign in to comment.