GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Http2 timeout documentation by sagitsofan · Pull Request #22798 · nodejs/node

Conversation

@sagitsofan

@sagitsofan sagitsofan commented Sep 10, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Added into documentation new default timeout values of "2 minutes" under 2 classes at "Event: 'timeout'" section.

  1. Class: Http2SecureServer
  2. Class: Http2Server

Documentation:
https://nodejs.org/api/http2.html#http2_event_timeout_2
https://nodejs.org/api/http2.html#http2_event_timeout_3

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vsemozhetbyt, bricss, and addaleax reacted with thumbs up emoji
All reactions
  • 👍 3 reactions
@sagitsofan
Http2 timeout documentation
93a39e7
Added into documentation new default timeout value of "2 minutes" inside 2 classes under "Event: 'timeout'"
1) Class: Http2SecureServer
2) Class: Http2Server
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to Node.js documentation. http2 Issues and PRs related to the http2 subsystem. labels Sep 10, 2018
@sagitsofan sagitsofan mentioned this pull request Sep 10, 2018
http2 server default timeout? #22789
Closed
mscdex
mscdex reviewed Sep 10, 2018
View reviewed changes
Comment thread doc/api/http2.md Outdated

The `'timeout'` event is emitted when there is no activity on the Server for
a given number of milliseconds set using `http2server.setTimeout()`.
**Default:** `2 Minutes`.

@mscdex mscdex Sep 10, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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 remove the backticks here, those are typically used to enclose a class name or a literal (JS) value. Also, 'Minutes' should probably be lowercased.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sagitsofan sagitsofan Sep 11, 2018

Copy link
Copy Markdown
Contributor Author

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.

Done.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
sagitsofan added 2 commits September 11, 2018 07:46
@sagitsofan
backticks
a47d0ab
removed backticks from default value
@sagitsofan
lower casing
8d409ce
lower casing
@sagitsofan

sagitsofan commented Sep 11, 2018

Copy link
Copy Markdown
Contributor Author

fixed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

apapirovski
apapirovski reviewed Sep 11, 2018
View reviewed changes

@apapirovski apapirovski left a comment

Copy link
Copy Markdown
Contributor

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.

Thanks for working on this. It would probably be better if the location of these defaults were more similar to the http docs: https://nodejs.org/api/http.html#http_server_timeout

Of course, these sections currently don't exist and they should also probably be created.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sagitsofan

sagitsofan commented Sep 11, 2018

Copy link
Copy Markdown
Contributor Author

Sure. working on it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sagitsofan added 2 commits September 11, 2018 21:41
@sagitsofan
added new section
f703eb0
added new section for setTimeout method inside Http2SecureServer & Http2Server docs
@sagitsofan
fix typo
30678e9
@sagitsofan

sagitsofan commented Sep 11, 2018

Copy link
Copy Markdown
Contributor Author

Please review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sagitsofan
row max length fix
885ecf9
vsemozhetbyt
vsemozhetbyt reviewed Sep 11, 2018
View reviewed changes

@vsemozhetbyt vsemozhetbyt left a comment

Copy link
Copy Markdown
Contributor

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.

Thank you for improving docs!

Just some nits)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread doc/api/http2.md Outdated
a given number of milliseconds set using `http2server.setTimeout()`.
**Default:** 2 minutes.

#### server.setTimeout([msecs][, callback])

@vsemozhetbyt vsemozhetbyt Sep 11, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

Section headings are ABC-sorted, so this and the next added headings need to be placed after the #### server.close([callback]).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vsemozhetbyt vsemozhetbyt Sep 11, 2018

Copy link
Copy Markdown
Contributor

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.

If an error is thrown if no callback is assigned, should we make the callback parameter in both signatures mandatory?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread doc/api/http2.md Outdated
* `callback` {Function}
* Returns: {Http2Server}

Used to set the timeout value for http2 secure server requests,

@vsemozhetbyt vsemozhetbyt Sep 11, 2018

Copy link
Copy Markdown
Contributor

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.

http2 secure server -> http2 server

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread doc/api/http2.md Outdated

Used to set the timeout value for http2 secure server requests,
and sets a callback function that is called when there is no activity
on the Http2Server after `msecs` milliseconds.

@vsemozhetbyt vsemozhetbyt Sep 11, 2018

Copy link
Copy Markdown
Contributor

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.

Http2Server -> `Http2Server`.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread doc/api/http2.md Outdated
and sets a callback function that is called when there is no activity
on the Http2Server after `msecs` milliseconds.

The given callback is registered as a listener on the 'timeout' event.

@vsemozhetbyt vsemozhetbyt Sep 11, 2018

Copy link
Copy Markdown
Contributor

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.

'timeout' -> `'timeout'`

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread doc/api/http2.md Outdated

Used to set the timeout value for http2 secure server requests,
and sets a callback function that is called when there is no activity
on the Http2Server after `msecs` milliseconds.

@vsemozhetbyt vsemozhetbyt Sep 11, 2018

Copy link
Copy Markdown
Contributor

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.

Http2SecureServer -> `Http2SecureServer`

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread doc/api/http2.md Outdated
The given callback is registered as a listener on the 'timeout' event.

In case of no callback were assigned, a new `ERR_INVALID_CALLBACK`
error will be throw.

@vsemozhetbyt vsemozhetbyt Sep 11, 2018

Copy link
Copy Markdown
Contributor

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.

throw -> thrown

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread doc/api/http2.md Outdated
and sets a callback function that is called when there is no activity
on the Http2Server after `msecs` milliseconds.

The given callback is registered as a listener on the 'timeout' event.

@vsemozhetbyt vsemozhetbyt Sep 11, 2018

Copy link
Copy Markdown
Contributor

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.

'timeout' -> `'timeout'`

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread doc/api/http2.md Outdated
The given callback is registered as a listener on the 'timeout' event.

In case of no callback were assigned, a new `ERR_INVALID_CALLBACK`
error will be throw.

@vsemozhetbyt vsemozhetbyt Sep 11, 2018

Copy link
Copy Markdown
Contributor

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.

throw -> thrown

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
sagitsofan added 2 commits September 11, 2018 22:50
@sagitsofan
typos & order
acda854
@sagitsofan
added function word
5ac898c
vsemozhetbyt
vsemozhetbyt reviewed Sep 11, 2018
View reviewed changes
Comment thread doc/api/http2.md Outdated
* `callback` {Function}
* Returns: {Http2SecureServer}

Used to set the timeout value for http2 server requests,

@vsemozhetbyt vsemozhetbyt Sep 11, 2018

Copy link
Copy Markdown
Contributor

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.

Sorry, in this section, http2 secure server seemed appropriate)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
vsemozhetbyt
vsemozhetbyt reviewed Sep 11, 2018
View reviewed changes
Comment thread doc/api/http2.md Outdated

Used to set the timeout value for http2 server requests,
and sets a callback function that is called when there is no activity
on the `Http2Server` after `msecs` milliseconds.

@vsemozhetbyt vsemozhetbyt Sep 11, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

`Http2Server` -> `Http2SecureServer` :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vsemozhetbyt

vsemozhetbyt commented Sep 11, 2018

Copy link
Copy Markdown
Contributor

сс @nodejs/http2

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@refack

refack commented Sep 11, 2018

Copy link
Copy Markdown
Contributor

Hello @sagitsofan and thank you for the contribution.
If you haven't already, it's recommended you take a look at CONTRIBUTING.md guide (especially the part about "discuss and update"). Customarily PRs are kept open for at least 48 hour so that anyone interested gets a chance to comment or review.
Also documentation changes, while easy to do are more difficult to validate. With code we can write tests and the CI can validate the change. With documentation the only way to validate is with human eyes, so don't be dismayed if you get a lot of feedback.
Anyway thank you for the contribution, and good luck 🥇

P.S. If you have any question you can also feel free to contact me directly & בהצלחה

sagitsofan reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sagitsofan
words changing 👍
c749d6e
@sagitsofan

sagitsofan commented Sep 11, 2018

Copy link
Copy Markdown
Contributor Author

Thank you @refack appreciate this

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mcollina

mcollina commented Sep 12, 2018

Copy link
Copy Markdown
Member

For posterity, here is the line defining the 2 minutes timeout:

node/lib/internal/http2/core.js

Line 163 in b36c581

const kDefaultSocketTimeout = 2 * 60 * 1000;
.

sagitsofan reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mcollina
mcollina approved these changes Sep 12, 2018
View reviewed changes

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

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.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
cjihrig
cjihrig approved these changes Sep 12, 2018
View reviewed changes
jasnell
jasnell approved these changes Sep 12, 2018
View reviewed changes
@vsemozhetbyt

vsemozhetbyt commented Sep 13, 2018

Copy link
Copy Markdown
Contributor

CI-lite: https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/878/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vsemozhetbyt pushed a commit that referenced this pull request Sep 13, 2018
@sagitsofan @vsemozhetbyt
doc: document http2 timeouts
19c0620
New default timeout values of "2 minutes" were added into documentation
inside 2 classes under "Event: 'timeout'":
1) Class: Http2SecureServer
2) Class: Http2Server

New sections for `.setTimeout()` method were added inside
`Http2SecureServer` & `Http2Server` docs.

PR-URL: #22798
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@vsemozhetbyt

vsemozhetbyt commented Sep 13, 2018

Copy link
Copy Markdown
Contributor

Landed in 19c0620
Thank you!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt vsemozhetbyt closed this Sep 13, 2018
@sagitsofan

sagitsofan commented Sep 13, 2018

Copy link
Copy Markdown
Contributor Author

Closed but without merging, why is that?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt

vsemozhetbyt commented Sep 13, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

It is merged, but in some other way, not with GitHub interface. See more about this in https://github.com/nodejs/node/blob/master/COLLABORATOR_GUIDE.md#landing-pull-requests

sagitsofan reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt

vsemozhetbyt commented Sep 13, 2018

Copy link
Copy Markdown
Contributor

See also a note in https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#step-10-landing

sagitsofan reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sagitsofan
sagitsofan deleted the my-branch branch September 14, 2018 11:23
targos pushed a commit that referenced this pull request Sep 14, 2018
@sagitsofan @targos
doc: document http2 timeouts
353cb4e
New default timeout values of "2 minutes" were added into documentation
inside 2 classes under "Event: 'timeout'":
1) Class: Http2SecureServer
2) Class: Http2Server

New sections for `.setTimeout()` method were added inside
`Http2SecureServer` & `Http2Server` docs.

PR-URL: #22798
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@sagitsofan
sagitsofan restored the my-branch branch September 15, 2018 08:05
@sagitsofan
sagitsofan deleted the my-branch branch September 15, 2018 17:16
@targos targos mentioned this pull request Sep 18, 2018
Release proposal: v10.11.0 #22932
Merged
targos pushed a commit that referenced this pull request Sep 19, 2018
@sagitsofan @targos
doc: document http2 timeouts
873ebeb
New default timeout values of "2 minutes" were added into documentation
inside 2 classes under "Event: 'timeout'":
1) Class: Http2SecureServer
2) Class: Http2Server

New sections for `.setTimeout()` method were added inside
`Http2SecureServer` & `Http2Server` docs.

PR-URL: #22798
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Sep 20, 2018
@sagitsofan @targos
doc: document http2 timeouts
ef2a0bd
New default timeout values of "2 minutes" were added into documentation
inside 2 classes under "Event: 'timeout'":
1) Class: Http2SecureServer
2) Class: Http2Server

New sections for `.setTimeout()` method were added inside
`Http2SecureServer` & `Http2Server` docs.

PR-URL: #22798
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
kjin pushed a commit to kjin/node that referenced this pull request Oct 3, 2018
@sagitsofan @kjin
doc: document http2 timeouts
b35457a
New default timeout values of "2 minutes" were added into documentation
inside 2 classes under "Event: 'timeout'":
1) Class: Http2SecureServer
2) Class: Http2Server

New sections for `.setTimeout()` method were added inside
`Http2SecureServer` & `Http2Server` docs.

PR-URL: nodejs#22798
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
kjin pushed a commit to kjin/node that referenced this pull request Oct 16, 2018
@sagitsofan @kjin
doc: document http2 timeouts
f9cd2d5
New default timeout values of "2 minutes" were added into documentation
inside 2 classes under "Event: 'timeout'":
1) Class: Http2SecureServer
2) Class: Http2Server

New sections for `.setTimeout()` method were added inside
`Http2SecureServer` & `Http2Server` docs.

PR-URL: nodejs#22798
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
BethGriggs pushed a commit that referenced this pull request Oct 17, 2018
@sagitsofan @BethGriggs
doc: document http2 timeouts
bae7c60
New default timeout values of "2 minutes" were added into documentation
inside 2 classes under "Event: 'timeout'":
1) Class: Http2SecureServer
2) Class: Http2Server

New sections for `.setTimeout()` method were added inside
`Http2SecureServer` & `Http2Server` docs.

Backport-PR-URL: #22850
PR-URL: #22798
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@BethGriggs BethGriggs mentioned this pull request Oct 30, 2018
v8.13.0 proposal #23974
Merged
@beevelop beevelop mentioned this pull request Nov 20, 2018
2018-11-20 Version 8.13.0 'Carbon' (LTS) @MylesBorins prepared by @BethGriggs beevelop/docker-android-nodejs#250
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mcollina mcollina mcollina approved these changes
@jasnell jasnell jasnell approved these changes
@cjihrig cjihrig cjihrig approved these changes
+3 more reviewers
@apapirovski apapirovski apapirovski left review comments
@mscdex mscdex mscdex left review comments
@vsemozhetbyt vsemozhetbyt vsemozhetbyt left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

doc Issues and PRs related to Node.js documentation. http2 Issues and PRs related to the http2 subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

9 participants

@sagitsofan @vsemozhetbyt @refack @mcollina @apapirovski @mscdex @jasnell @cjihrig @nodejs-github-bot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.