-
Notifications
You must be signed in to change notification settings - Fork 241
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
Timeout option doesn't work as expected #256
Comments
I think the problem is around these lines of code: proxy-agents/packages/https-proxy-agent/src/index.ts Lines 134 to 141 in b133295
In proxy-agents/packages/socks-proxy-agent/src/index.ts Lines 152 to 159 in b133295
When timeout is over socks_1.SocksClient.createConnection(socksOpts)) throws this error:
And However, in |
Agree, socket hangs indefinitely in my case too. @archvlad , the fix seems to be pretty straightforward. |
🐞 Bug Report
Describe the bug
When I send request using
node-fetch
without proxy and it take a long time for server to respond I usetimeout
to limit the time of awaiting response. Aftertimeout
passed error is thrown. But when I make request with proxy using HttpsProxyAgent to the same server I receive error not aftertimeout
but after about 30 seconds.To Reproduce
Expected behaviour
Your environment
The text was updated successfully, but these errors were encountered: