Allow true zero-second timeout in send_request_*#12007
Merged
wvu merged 3 commits intorapid7:masterfrom Jun 28, 2019
Merged
Conversation
Also fixes a bogus response when timeout is nil.
Merged
Contributor
Author
|
Since I got a LGTM from @jrobles-r7, this addresses the linked PR, and no else has raised concerns, I'm landing this. :) |
wvu
added a commit
that referenced
this pull request
Jun 28, 2019
msjenkins-r7
pushed a commit
that referenced
this pull request
Jun 28, 2019
Contributor
Author
Release NotesThis fix changes the behavior of the |
3 tasks
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also fixes a bogus response when timeout is
nil.Timeout.timeout(0)implies that the block will not time out, which is usually not what we want when we set thetimeoutparameter to0to address a lack of response.See #2820 for the only known example. Note that Juan had to ^C his module when he wanted to return immediately. So, this actually fixes a bug.
timeoutvalue ofnilis returning an unfilledRex::Proto::Http::Response, which is a bogus200 OKthat isn't meant to be parsed.I did not find any examples of a
niltimeout being used. Most people set something low instead. Either way, the response should benil, never something bogus.Resolves #12004, in a manner of speaking. cc @cyrus-and