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

Add support for request timeout in HTTP transport #564

Open
gnarea opened this issue Jul 31, 2023 · 2 comments
Open

Add support for request timeout in HTTP transport #564

gnarea opened this issue Jul 31, 2023 · 2 comments

Comments

@gnarea
Copy link

gnarea commented Jul 31, 2023

I'd be happy to propose a PR, but I'd recommend rewriting the transport with fetch instead of extending the current approach:

const req = base.request(url, opts, (res: Socket) => {

... As I'd have to use setTimeout(), which would make the code more complicated.

The drawback of fetch() is that it'd require Node.js 18+. Which shouldn't be too bad as Node.js 16 is reaching EOL in a few weeks.

@lholmquist
Copy link
Contributor

@gnarea feel free to submit a PR 👍

looks like the exact date it the 11th of September for node 16 EOL, so probably wouldn't merge until then

@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants