Skip to content

Set incoming requesting timeout #1154

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

Closed
wants to merge 1 commit into from

Conversation

phillipj
Copy link

@phillipj phillipj commented Mar 17, 2017

This ensures the incoming request does not timeout before the target's timeout configured with options.proxyTimeout.

As I'm not familiar to the code base, I struggled seeing the best entry to write a test for this. Any thoughts would be appreciated.

Fixes #1113

Edit: I'm looking into the existing timeout test failing

This ensures the incoming request does not timeout before the target's
timeout configured with `options.proxyTimeout`

Fixes http-party#1113
@phillipj
Copy link
Author

Looking at the test that fails with these changes added, I wonder if that test is wrong.

It doesn't expect the client request being made to throw an error if an error occurs. At first glance that seems weird, cause a timeout is also an error to the client initiating the request, right?

Additionally there is two very similar tests, whereas the latter succeeds cause it expects timeouts to raise client error:

@indexzero
Copy link
Member

Closing as a duplicate of #1273 – if it's not a strict duplicate . from a software design perspective this belongs in the passes not in the root lib/http-proxy/index.js

@indexzero indexzero closed this Aug 22, 2019
@indexzero
Copy link
Member

Thanks for helping triage this issue and contribute a proposed fix though 😸

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

Successfully merging this pull request may close these issues.

Specify incoming request socket timeout
2 participants