forwardemail / forwardemail/superagent
[fix] request hangs forever for non-responding servers (default timeout would fix this)
- Dominant language
- JavaScript
- Stars
- 16.6k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
## 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
- [x] I have searched through GitHub issues for similar issues.
- [x] 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.
Contributor guide
Assessment
This issue has not been assessed yet.