Don't use sys.puts for debug in net.js
This commit is contained in:
parent
a01d8a0d68
commit
3238944c7a
10
lib/net.js
10
lib/net.js
@ -119,7 +119,7 @@ var timeout = new (function () {
|
||||
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;
|
||||
@ -128,7 +128,7 @@ var timeout = new (function () {
|
||||
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);
|
||||
@ -137,7 +137,7 @@ var timeout = new (function () {
|
||||
first.forceClose(new Error('idle timeout'));
|
||||
}
|
||||
}
|
||||
sys.puts(msecs + ' list empty');
|
||||
debug(msecs + ' list empty');
|
||||
assert(list._idleNext == list); // list is empty
|
||||
list.stop();
|
||||
};
|
||||
@ -160,9 +160,9 @@ var timeout = new (function () {
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user