Conversation
Added into documentation new default timeout value of "2 minutes" inside 2 classes under "Event: 'timeout'" 1) Class: Http2SecureServer 2) Class: Http2Server
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`. |
There was a problem hiding this comment.
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.
lower casing
|
fixed |
apapirovski
left a comment
There was a problem hiding this comment.
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.
|
Sure. working on it. |
added new section for setTimeout method inside Http2SecureServer & Http2Server docs
|
Please review |
vsemozhetbyt
left a comment
There was a problem hiding this comment.
Thank you for improving docs!
Just some nits)
doc/api/http2.md
Outdated
| a given number of milliseconds set using `http2server.setTimeout()`. | ||
| **Default:** 2 minutes. | ||
|
|
||
| #### server.setTimeout([msecs][, callback]) |
There was a problem hiding this comment.
Section headings are ABC-sorted, so this and the next added headings need to be placed after the #### server.close([callback]).
There was a problem hiding this comment.
If an error is thrown if no callback is assigned, should we make the callback parameter in both signatures mandatory?
doc/api/http2.md
Outdated
| * `callback` {Function} | ||
| * Returns: {Http2Server} | ||
|
|
||
| Used to set the timeout value for http2 secure server requests, |
There was a problem hiding this comment.
http2 secure server -> http2 server
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. |
There was a problem hiding this comment.
Http2Server -> `Http2Server`.
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. |
There was a problem hiding this comment.
'timeout' -> `'timeout'`
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. |
There was a problem hiding this comment.
Http2SecureServer -> `Http2SecureServer`
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. |
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. |
There was a problem hiding this comment.
'timeout' -> `'timeout'`
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. |
doc/api/http2.md
Outdated
| * `callback` {Function} | ||
| * Returns: {Http2SecureServer} | ||
|
|
||
| Used to set the timeout value for http2 server requests, |
There was a problem hiding this comment.
Sorry, in this section, http2 secure server seemed appropriate)
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. |
There was a problem hiding this comment.
`Http2Server` -> `Http2SecureServer` :)
|
сс @nodejs/http2 |
|
Hello @sagitsofan and thank you for the contribution. P.S. If you have any question you can also feel free to contact me directly & בהצלחה |
|
Thank you @refack appreciate this |
|
For posterity, here is the line defining the 2 minutes timeout: node/lib/internal/http2/core.js Line 163 in b36c581 |
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 <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
Landed in 19c0620 |
|
Closed but without merging, why is that? |
|
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 |
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 <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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 <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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 <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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 <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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 <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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 <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Added into documentation new default timeout values of "2 minutes" under 2 classes at "Event: 'timeout'" section.
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), orvcbuild test(Windows) passes