node-http-proxy icon indicating copy to clipboard operation
node-http-proxy copied to clipboard

No Event Fired on Timeout

Open m13t opened this issue 10 years ago • 1 comments

Hi,

I have set up a reverse proxy with a timeout set up, but when the timeout occurs, no even is fired and nothing happens in the error event handler. If I use CURL to connect to the proxy, after the timeout period, the server just sends an empty response.

What is the correct way of setting up and handling a proxy timeout? I require a low (5 second) timeout on the proxy but want to be able to handle the timeout gracefully in order to both log the request and present the end user with an error page rather than a standard browser 'no response' page.

Thanks

m13t avatar Jul 11 '16 18:07 m13t

Just had the same issue, I switched from using "timeout" to "proxyTimeout" in my option object, and it works just fine. The error is emitted and you get an error - socket hung up

amirsch avatar Jul 24 '16 14:07 amirsch