When sending request to a slow server with a short timeout value, before the server returns back anything, calling request.abort does not clear timeoutTimer. The ETIMEDOUT error will still be reported.
e.g.
var r = request.get('http://slowserver', request.defaults({ timeout : 10000 } ));
r.on('error', function (error) {
//We should not see ETIMEDOUT error here
console.log(error);
});
r.pipe(...);
process.nextTick(function () {
r.abort();
});
When sending request to a slow server with a short timeout value, before the server returns back anything, calling request.abort does not clear timeoutTimer. The ETIMEDOUT error will still be reported.
e.g.