With the current implementation I can't get hold of the socket and set a timeout before the proxy connection to the final endpoint has succeeded.
The following code doesn't work because the 'socket' event is emitted too late
req.on('socket', function(socket) {
socket.setTimeout(5000);
});
This doesn't work either as node's http client propagates the request's setTimeout either after 'connect' or after 'socket' depending on the situation
With the current implementation I can't get hold of the socket and set a timeout before the proxy connection to the final endpoint has succeeded.
The following code doesn't work because the 'socket' event is emitted too late
This doesn't work either as node's http client propagates the request's setTimeout either after 'connect' or after 'socket' depending on the situation