Skip to content
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

[fix] request hangs forever for non-responding servers (default timeout would fix this) #1759

Open
2 tasks done
natanavra opened this issue Dec 28, 2022 · 0 comments
Open
2 tasks done
Labels

Comments

@natanavra
Copy link

natanavra commented Dec 28, 2022

Describe the bug

Superagent hangs if the server is unresponsive and the only way around is setting a timeout.
This might go over many developers heads as a default timeout of 60 seconds is to be expected.

Documentation states it's expected behavior, but this is buried and is unnoticed until you actually use a timeout or have a request get freezing your app if using await.

EDIT: It seems that axios has the same behavior, so it could just be me in this case.

Node.js version: 12.22.0

OS version: Ubuntu 20.04

Description:
See above

Actual behavior

request.get('tiktok.com'); will never complete

Expected behavior

should throw a timeout error after 60 seconds if no timeout was set

Code to reproduce

request.get('tiktok.com');

Checklist

  • I have searched through GitHub issues for similar issues.
  • I have completely read through the README and documentation.
  • [] I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.
@natanavra natanavra added the Bug label Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant