Skip to content

Set incoming requesting timeout#1154

Closed
phillipj wants to merge 1 commit into
http-party:masterfrom
phillipj:set-req-timeout
Closed

Set incoming requesting timeout#1154
phillipj wants to merge 1 commit into
http-party:masterfrom
phillipj:set-req-timeout

Conversation

@phillipj
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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