|
|
@ -1,12 +1,8 @@ |
|
|
|
var Timer = process.binding('timer').Timer; |
|
|
|
var assert = process.assert; |
|
|
|
|
|
|
|
/* |
|
|
|
* To enable debug statements for the timers do NODE_DEBUG=8 ./node script.js |
|
|
|
*/ |
|
|
|
var debugLevel = parseInt(process.env.NODE_DEBUG, 16); |
|
|
|
var debug; |
|
|
|
if (debugLevel & 0x8) { |
|
|
|
if (process.env.NODE_debug && /timer/.test(process.env.NODE_debug)) { |
|
|
|
debug = function() { require('util').error.apply(this, arguments); }; |
|
|
|
} else { |
|
|
|
debug = function() { }; |
|
|
@ -117,9 +113,9 @@ var unenroll = exports.unenroll = function(item) { |
|
|
|
|
|
|
|
var list = lists[item._idleTimeout]; |
|
|
|
// if empty then stop the watcher
|
|
|
|
//debug('unenroll');
|
|
|
|
debug('unenroll'); |
|
|
|
if (list && list._idlePrev == list) { |
|
|
|
//debug('unenroll: list empty');
|
|
|
|
debug('unenroll: list empty'); |
|
|
|
list.stop(); |
|
|
|
} |
|
|
|
} |
|
|
|