-
Notifications
You must be signed in to change notification settings - Fork 545
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
feat: add support for Timeout and Trailers #3854
base: main
Are you sure you want to change the base?
Conversation
@@ -278,6 +283,7 @@ function shouldSendContentLength (method) { | |||
} | |||
|
|||
function writeH2 (client, request) { | |||
const requestTimeout = request.bodyTimeout ?? client[kBodyTimeout] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was quite unsure if using the bodyTimeout
for this, and adding a new one. But given the nature of the timeout, using the body's one should be enough.
@@ -375,6 +381,7 @@ function writeH2 (client, request) { | |||
session[kOpenStreams] -= 1 | |||
if (session[kOpenStreams] === 0) session.unref() | |||
}) | |||
stream.setTimeout(requestTimeout) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not call this if there isn't a requestTimeout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean that if no bodyTimeout
passed at a request level, we just ignore it, discarding the one set for the client itself? Or do you have something else in mind?
This relates to...
Rationale
Changes
Features
Bug Fixes
Breaking Changes and Deprecations
Status