Skip to content

Commit 3528c9d

Browse files
committed
Clear timeout when user end before auto trigger
1 parent 8b7fa39 commit 3528c9d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apps/frontend/src/components/CollaborativeEditor/CollaborativeEditor.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,12 @@ const CollaborativeEditor = forwardRef(
175175
true
176176
);
177177
success("Session ended. All participants will be notified.");
178+
179+
// Event when peer disconnected, in between 0-15s user decides to end session before auto end session is triggered from inactivity
180+
if (sessionEndTimeout) {
181+
clearTimeout(sessionEndTimeout);
182+
sessionEndTimeout = null;
183+
}
178184
}
179185
},
180186
}));

0 commit comments

Comments
 (0)