Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Co.fs.stat(__filename, function(err, stat2) {
Co.println("stat2");
fire();
});
timer = setTimeout(function() {
Co.println('unloop');
fire();
});
Co.fs.stat(__filename, function(err, stat) {
Co.println("stat1");
var looped = false;
var unlooped = false;
var timer ;
function fire() {
unlooped = true;
if (looped) {
looped = false;
loop.unloop();
}
if (timer) {
clearTimeout(timer);
timer = null;
}