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;
|
lists[msecs] = list;
|
||||||
|
|
||||||
list.callback = function () {
|
list.callback = function () {
|
||||||
sys.puts('timeout callback ' + msecs);
|
debug('timeout callback ' + msecs);
|
||||||
// TODO - don't stop and start the watcher all the time.
|
// TODO - don't stop and start the watcher all the time.
|
||||||
// just set its repeat
|
// just set its repeat
|
||||||
var now = process.now;
|
var now = process.now;
|
||||||
@ -128,7 +128,7 @@ var timeout = new (function () {
|
|||||||
var diff = now - first._idleStart;
|
var diff = now - first._idleStart;
|
||||||
if (diff < msecs) {
|
if (diff < msecs) {
|
||||||
list.again(msecs - diff);
|
list.again(msecs - diff);
|
||||||
sys.puts(msecs + ' list wait');
|
debug(msecs + ' list wait');
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
remove(first);
|
remove(first);
|
||||||
@ -137,7 +137,7 @@ var timeout = new (function () {
|
|||||||
first.forceClose(new Error('idle timeout'));
|
first.forceClose(new Error('idle timeout'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sys.puts(msecs + ' list empty');
|
debug(msecs + ' list empty');
|
||||||
assert(list._idleNext == list); // list is empty
|
assert(list._idleNext == list); // list is empty
|
||||||
list.stop();
|
list.stop();
|
||||||
};
|
};
|
||||||
@ -160,9 +160,9 @@ var timeout = new (function () {
|
|||||||
|
|
||||||
var list = lists[socket._idleTimeout];
|
var list = lists[socket._idleTimeout];
|
||||||
// if empty then stop the watcher
|
// if empty then stop the watcher
|
||||||
//sys.puts('unenroll');
|
//debug('unenroll');
|
||||||
if (list && list._idlePrev == list) {
|
if (list && list._idlePrev == list) {
|
||||||
//sys.puts('unenroll: list empty');
|
//debug('unenroll: list empty');
|
||||||
list.stop();
|
list.stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user