Commit 5185c129 by Diana Huang

Address code review feedback.

parent 1088e5d5
...@@ -197,11 +197,12 @@ ...@@ -197,11 +197,12 @@
function set_poll_interval(new_polling_interval) { function set_poll_interval(new_polling_interval) {
// The polling interval will be in seconds, so we need to multiply by 1000 to get the interval in miliseconds. // The polling interval will be in seconds, so we need to multiply by 1000 to get the interval in milliseconds.
new_pollint_interval = new_polling_interval * 1000; new_polling_interval = new_polling_interval * 1000;
if (new_polling_interval != _current_interval) { if (new_polling_interval != _current_interval) {
clearInterval(_poll_interval_id); clearInterval(_poll_interval_id);
_poll_interval_id = setInterval(poll_exam_status, new_polling_interval); _poll_interval_id = setInterval(poll_exam_status, new_polling_interval);
_current_interval = new_polling_interval;
} }
} }
...@@ -217,8 +218,7 @@ ...@@ -217,8 +218,7 @@
window.external.quitApplication(); window.external.quitApplication();
} }
// The polling interval is returned in seconds, so we need to multiply by 1000. set_poll_interval(parseInt(data.polling_interval));
set_poll_interval(parseInt(data.polling_intervall));
}); });
} }
......
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