Commit 6e725ace authored by Christopher Mark Fullarton's avatar Christopher Mark Fullarton
Browse files

Initializes the quiz state interval checker if the state is changed from inactive

parent 65666218
......@@ -78,6 +78,13 @@ export class QuizEntity extends AbstractEntity implements IQuizEntity {
}
set state(value: QuizState) {
if (this._state === QuizState.Inactive && value !== QuizState.Inactive) {
clearInterval(this._dropEmptyQuizSettings.intervalInstance);
this._dropEmptyQuizSettings.intervalInstance = setInterval(() => {
this.checkExistingConnection();
}, this._dropEmptyQuizSettings.interval);
}
this._state = value;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment