Skip to content

Commit

Permalink
Merge pull request #339 from phiter/#338-fix-external-meeting-monitoring
Browse files Browse the repository at this point in the history
fix(office): add reset to the monitoring interval when creating a new…
  • Loading branch information
juliemar authored Jul 17, 2020
2 parents 8d4c8b6 + e6db722 commit 25a16d0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/src/morpheus/containers/OfficePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ import { emitEnterInRoom, emitStartMeeting, emitLeftMeeting} from "../socket";
import { setCurrentRoom } from "../store/actions";
import { CurrentRoomPropType } from "../store/models";

let activeMonitorInterval;

const externalMeetRoomMonitoring = (externalMeetRoom) => {
const interval = window.setInterval(() => {
window.clearInterval(activeMonitorInterval);

activeMonitorInterval = window.setInterval(() => {
if (!externalMeetRoom.closed) return;

emitLeftMeeting();
window.clearInterval(interval);
window.clearInterval(activeMonitorInterval);
}, 1000);
};

Expand Down

0 comments on commit 25a16d0

Please sign in to comment.