lists[msecs] = list;
list.callback = function () {
- sys.puts('timeout callback ' + msecs);
+ debug('timeout callback ' + msecs);
// TODO - don't stop and start the watcher all the time.
// just set its repeat
var now = process.now;
var diff = now - first._idleStart;
if (diff < msecs) {
list.again(msecs - diff);
- sys.puts(msecs + ' list wait');
+ debug(msecs + ' list wait');
return;
} else {
remove(first);
first.forceClose(new Error('idle timeout'));
}
}
- sys.puts(msecs + ' list empty');
+ debug(msecs + ' list empty');
assert(list._idleNext == list); // list is empty
list.stop();
};
var list = lists[socket._idleTimeout];
// if empty then stop the watcher
- //sys.puts('unenroll');
+ //debug('unenroll');
if (list && list._idlePrev == list) {
- //sys.puts('unenroll: list empty');
+ //debug('unenroll: list empty');
list.stop();
}
}