Skip to content

Commit 3065180

Browse files
committed
add another valid condition for connected
1 parent 075e186 commit 3065180

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/matrixrtc/NewMembershipManager.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,16 @@ class ActionScheduler {
344344
) {
345345
return Status.Connected;
346346
}
347+
} else if (actions.length === 3) {
348+
const types = actions.map((a) => a.type);
349+
// It is a correct connected state if we already schedule the next Restart but have not yet cleaned up
350+
// the current restart.
351+
if (
352+
types.filter((t) => t === MembershipActionType.RestartDelayedEvent).length === 2 &&
353+
types.includes(MembershipActionType.UpdateExpiry)
354+
) {
355+
return Status.Connected;
356+
}
347357
}
348358

349359
if (!this.state.running) {

0 commit comments

Comments
 (0)