mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Don't use sys.puts for debug in net.js
This commit is contained in:
1 parent
a01d8a0d68
commit
3238944c7a
1 file changed
+5
-5
+5
-5
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user