On Jan 23, 4:38 pm, min <
m...@navcomtech.com> wrote:
> Is this a bug in the current node.js or am I doing something wrong?
> I tried v0.6.1-pre and the latest v0.6.8. Both showed the same
> behavior.
The documentation for sockets ('net' module) is correct. However, http/
https servers set their own socket timeout which calls
socket.destroy():
https://github.com/joyent/node/blob/v0.6/lib/http.js#L1389-L1391
What you'd need to do is:
function onRequest(request, response) {
request.socket.removeAllListeners('timeout');
request.socket.setTimeout(10000);
request.socket.on('timeout', function() {