-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https.request timeout options doesn't work #23282
Comments
I can confirm this behaviour in my Ubuntu 18.04 as well, with Node.js 8.11.3. cc @nodejs/http |
I'm observing the same behavior with |
I still can't find documentation on how to set a custom timeout for a given request :-( the following isn't working .... :
Doing this doesn't work either :
Can someone help ? |
this worked for me: let promiseHTTPSRequest = function(options)
|
I tried reproducing the original issue and for me everything works as expected |
I thought I was facing this behavior with Node v17.5.0 on macOS. But no! Only works with Then with setTimeout seems to be working very well. |
Encountering this weird behavior as well, timeout is not being hit. Node v18.13 |
Node version 8.11.3. 64-bit Windows 8.1
As I understood from docs,
timeout
property inhttps.request
options sets socket connection timeout.I set it to minimum - 1 millisecond and it should definitely trigger 'timeout' event.
I expect 'reqest timeout' console message but it doen't appear.
However, when I create my custom https Agent with overriden
createConnection
method that sets initial socket timeout to 1 millisecond there:and run the first code with agent parameter set to my custom agent, now it fires 'timeout' event.
The text was updated successfully, but these errors were encountered: