Enable TCP timeout by default
This commit is contained in:
parent
d923c94a0c
commit
cb84cde4d4
@ -5,6 +5,7 @@ var dns = require('dns');
|
|||||||
|
|
||||||
var kMinPoolSpace = 128;
|
var kMinPoolSpace = 128;
|
||||||
var kPoolSize = 40*1024;
|
var kPoolSize = 40*1024;
|
||||||
|
var kDefaultTimeout = 60*1000;
|
||||||
|
|
||||||
var debugLevel = process.env['NODE_DEBUG'] ? 1 : 0;
|
var debugLevel = process.env['NODE_DEBUG'] ? 1 : 0;
|
||||||
function debug () {
|
function debug () {
|
||||||
@ -257,6 +258,8 @@ function _doFlush () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initStream (self) {
|
function initStream (self) {
|
||||||
|
timeout.enroll(self, kDefaultTimeout);
|
||||||
|
|
||||||
self._readWatcher = ioWatchers.alloc();
|
self._readWatcher = ioWatchers.alloc();
|
||||||
self._readWatcher.callback = function () {
|
self._readWatcher.callback = function () {
|
||||||
// If this is the first recv (pool doesn't exist) or we've used up
|
// If this is the first recv (pool doesn't exist) or we've used up
|
||||||
|
Loading…
x
Reference in New Issue
Block a user