try harder to keep setTimeout loop going in controller-dispatcher

This commit is contained in:
Seth Alves 2017-12-12 12:38:01 -08:00
parent cf3e9f78c9
commit dba05ae8e2

View file

@ -154,6 +154,15 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
};
this.update = function () {
try {
this.updateInternal();
} catch (e) {
print(e);
}
Script.setTimeout(_this.update, BASIC_TIMER_INTERVAL_MS);
};
this.updateInternal = function () {
if (PROFILE) {
Script.beginProfileRange("dispatch.pre");
}
@ -376,7 +385,6 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
if (PROFILE) {
Script.endProfileRange("dispatch.run");
}
Script.setTimeout(_this.update, BASIC_TIMER_INTERVAL_MS);
};
this.setBlacklist = function() {