Commit b5a33456 authored by Jörn Zaefferer's avatar Jörn Zaefferer

Clear timeout (prevents freezing of test suite when async tests fail) when start is called

parent b0c3711d
......@@ -8,6 +8,7 @@ var stats = {
};
var queue = [];
var blocking = false;
var timeout;
function synchronize(callback) {
queue[queue.length] = callback;
......@@ -26,9 +27,11 @@ function process() {
function stop() {
blocking = true;
setTimeout(start, asyncTimeout * 1000);
timeout = setTimeout(start, asyncTimeout * 1000);
}
function start() {
if(timeout)
clearTimeout(timeout);
blocking = false;
process();
}
......
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