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

http: set socket timeout when socket connects #8895

Closed
wants to merge 1 commit into
base: master
from

Conversation

@lpinca
Member

lpinca commented Oct 2, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

http

Description of change

request.setTimeout() calls socket.setTimeout() as soon as a socket is assigned to the request. This makes the timeout event to be emitted on the request even if the underlying socket never connects.

This commit makes socket.setTimeout() to be called only when the underlying socket is connected.

@lpinca

This comment has been minimized.

Show comment
Hide comment
@evanlucas

I would think that this would be semver major since it changes the timing?

Show outdated Hide outdated test/parallel/test-http-client-timeout-on-connect.js Outdated
@lpinca

This comment has been minimized.

Show comment
Hide comment
@lpinca

lpinca Oct 3, 2016

Member

@evanlucas yeah semver major or patch depending on if it is considered a bug fix or not.

Member

lpinca commented Oct 3, 2016

@evanlucas yeah semver major or patch depending on if it is considered a bug fix or not.

@@ -639,7 +639,9 @@ ClientRequest.prototype.setTimeout = function(msecs, callback) {
}
this.once('socket', function(sock) {
sock.setTimeout(msecs, emitTimeout);
sock.once('connect', function() {
sock.setTimeout(msecs, emitTimeout);

This comment has been minimized.

@addaleax

addaleax Oct 3, 2016

Member

nit: This is probably over-micro-optimizing, but using this instead of sock inside the callback would avoid allocating a closure every time here.

@addaleax

addaleax Oct 3, 2016

Member

nit: This is probably over-micro-optimizing, but using this instead of sock inside the callback would avoid allocating a closure every time here.

This comment has been minimized.

@lpinca

lpinca Oct 3, 2016

Member

It makes sense. Used sock for readability but happy to fix it.

@lpinca

lpinca Oct 3, 2016

Member

It makes sense. Used sock for readability but happy to fix it.

Show outdated Hide outdated test/parallel/test-http-client-timeout-on-connect.js Outdated
Show outdated Hide outdated lib/_http_client.js Outdated
@jasnell

jasnell approved these changes Oct 6, 2016

LGTM

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Oct 7, 2016

Member

re: semver-patch or semver-major, It's not clear to me either. Let's see what @nodejs/ctc think...

Member

jasnell commented Oct 7, 2016

re: semver-patch or semver-major, It's not clear to me either. Let's see what @nodejs/ctc think...

@addaleax

This comment has been minimized.

Show comment
Hide comment
@addaleax

addaleax Oct 7, 2016

Member

It might help to know why the old behaviour was bad, and if it was undesirable in all cases?

Member

addaleax commented Oct 7, 2016

It might help to know why the old behaviour was bad, and if it was undesirable in all cases?

@indutny

Thanks for contributing this! Could you please elaborate on why this is better than the current behavior?

@lpinca

This comment has been minimized.

Show comment
Hide comment
@lpinca

lpinca Oct 8, 2016

Member

@indutny I don't know if it's better but

  1. It is consistent with the documentation: "Once a socket is assigned to this request and is connected socket.setTimeout() will be called."
  2. It is consistent with this case?
Member

lpinca commented Oct 8, 2016

@indutny I don't know if it's better but

  1. It is consistent with the documentation: "Once a socket is assigned to this request and is connected socket.setTimeout() will be called."
  2. It is consistent with this case?
@indutny

This comment has been minimized.

Show comment
Hide comment
@indutny

indutny Oct 8, 2016

Member

@lpinca thank you for explanation! I see that we have an inconsistency here indeed. I wonder if we should do it in reverse instead and always set timeout without waiting for connect event?

If we'll go the way it is proposed in this PR, http.request().setTimeout() won't be triggered if socket hasn't connected in a reasonable time. Kernel defaults are usually around 1 minute and this may be too much.

Member

indutny commented Oct 8, 2016

@lpinca thank you for explanation! I see that we have an inconsistency here indeed. I wonder if we should do it in reverse instead and always set timeout without waiting for connect event?

If we'll go the way it is proposed in this PR, http.request().setTimeout() won't be triggered if socket hasn't connected in a reasonable time. Kernel defaults are usually around 1 minute and this may be too much.

@lpinca

This comment has been minimized.

Show comment
Hide comment
@lpinca

lpinca Oct 8, 2016

Member

@indutny yes it makes sense. I know that some userland modules use an additional timer that is cleared when the response event is emitted to handle cases like the one you are describing.

Should I open a new PR to always set the timeout without waiting for the connect event? If so should this one be closed?

Member

lpinca commented Oct 8, 2016

@indutny yes it makes sense. I know that some userland modules use an additional timer that is cleared when the response event is emitted to handle cases like the one you are describing.

Should I open a new PR to always set the timeout without waiting for the connect event? If so should this one be closed?

@indutny

This comment has been minimized.

Show comment
Hide comment
@indutny

indutny Oct 8, 2016

Member

@lpinca perhaps, let's see what others from @nodejs/http or @nodejs/ctc think?

Thanks!

Member

indutny commented Oct 8, 2016

@lpinca perhaps, let's see what others from @nodejs/http or @nodejs/ctc think?

Thanks!

@lpinca

This comment has been minimized.

Show comment
Hide comment
@lpinca

lpinca Oct 18, 2016

Member

@indutny I thought again about this and I think it doesn't make sense to change request.setTimeout() to make it set the timeout without waiting the connect event.

It seems that in all cases (1, 2) request.setTimeout() explicitly checks if the socket is connected (with the exception of the one this PR deals with) so I guess it's like this by design.

The case you are describing is handled by the timeout option of http.request(). That timeout is forwarded to net.createConnection() without waiting for the socket to be connected.

Member

lpinca commented Oct 18, 2016

@indutny I thought again about this and I think it doesn't make sense to change request.setTimeout() to make it set the timeout without waiting the connect event.

It seems that in all cases (1, 2) request.setTimeout() explicitly checks if the socket is connected (with the exception of the one this PR deals with) so I guess it's like this by design.

The case you are describing is handled by the timeout option of http.request(). That timeout is forwarded to net.createConnection() without waiting for the socket to be connected.

lpinca referenced this pull request in floatdrop/timed-out Jan 16, 2017

@jasnell jasnell added the stalled label Mar 1, 2017

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Aug 24, 2017

Member

Closing due to lack of forward progress. We can reopen if necessary

Member

jasnell commented Aug 24, 2017

Closing due to lack of forward progress. We can reopen if necessary

@jasnell jasnell closed this Aug 24, 2017

@lpinca

This comment has been minimized.

Show comment
Hide comment
@lpinca

lpinca Aug 25, 2017

Member

I think it still makes sense. If we want to keep the current behavior we should at least update the documentation accordingly.

Member

lpinca commented Aug 25, 2017

I think it still makes sense. If we want to keep the current behavior we should at least update the documentation accordingly.

@BridgeAR

This comment has been minimized.

Show comment
Hide comment
@BridgeAR

BridgeAR Aug 25, 2017

Member

I am for reopening this. I think it makes sense and I would consider it as a bug fix because it is clearly documented to behave like this PR.

Member

BridgeAR commented Aug 25, 2017

I am for reopening this. I think it makes sense and I would consider it as a bug fix because it is clearly documented to behave like this PR.

@jasnell jasnell reopened this Aug 25, 2017

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Aug 25, 2017

Member

Done! :-) thank you both for weighing in.

Member

jasnell commented Aug 25, 2017

Done! :-) thank you both for weighing in.

@BridgeAR

This comment has been minimized.

Show comment
Hide comment
@BridgeAR

BridgeAR Aug 25, 2017

Member

@indutny would you be so kind and have another look at the @lpinca s comment?

Member

BridgeAR commented Aug 25, 2017

@indutny would you be so kind and have another look at the @lpinca s comment?

Removing the blocking review due to no response and your question seemed to be properly answered. Please take another look.

@BridgeAR

This comment has been minimized.

Show comment
Hide comment
@BridgeAR

BridgeAR Sep 12, 2017

Member

Due to the fact that I dismissed the review of @indutny PTAL including @nodejs/tsc.

Member

BridgeAR commented Sep 12, 2017

Due to the fact that I dismissed the review of @indutny PTAL including @nodejs/tsc.

@BridgeAR BridgeAR removed the stalled label Sep 12, 2017

@mscdex

This comment has been minimized.

Show comment
Hide comment
@mscdex

mscdex Sep 12, 2017

Contributor

I can't help but think many people are already using this as a connection and completion timeout combo.

Contributor

mscdex commented Sep 12, 2017

I can't help but think many people are already using this as a connection and completion timeout combo.

@mcollina

LGTM as semver-major with a rebase and a fresh CI run.

Even it is documented wrongly, there is a non-null chance that it will break existing code.

http: set socket timeout when socket connects
`request.setTimeout()` calls `socket.setTimeout()` as soon as a socket
is assigned to the request. This makes the `timeout` event to be
emitted on the request even if the underlying socket never connects.

This commit makes `socket.setTimeout()` to be called only when the
underlying socket is connected.
@lpinca

This comment has been minimized.

Show comment
Hide comment
@lpinca
Member

lpinca commented Sep 13, 2017

@lpinca lpinca added the semver-major label Sep 13, 2017

@BridgeAR

This comment has been minimized.

Show comment
Hide comment
@BridgeAR

Still LGTM

@BridgeAR

This comment has been minimized.

Show comment
Hide comment
@BridgeAR

BridgeAR Sep 20, 2017

Member

@lpinca I think this one is unrelated, right? It occurred only once on one machine but I guess asking is good in this case.

not ok 941 parallel/test-listen-fd-ebadf
  ---
  duration_ms: 0.102
  severity: fail
  stack: |-
    assert.js:44
      throw new errors.AssertionError({
      ^
    
    AssertionError [ERR_ASSERTION]: 'ENOTSOCK' === 'EINVAL'
        at Server.onError (/home/iojs/build/workspace/node-test-commit-linux/nodes/ubuntu1604-intel-64/test/parallel/test-listen-fd-ebadf.js:33:10)
        at Server.<anonymous> (/home/iojs/build/workspace/node-test-commit-linux/nodes/ubuntu1604-intel-64/test/common/index.js:514:15)
Member

BridgeAR commented Sep 20, 2017

@lpinca I think this one is unrelated, right? It occurred only once on one machine but I guess asking is good in this case.

not ok 941 parallel/test-listen-fd-ebadf
  ---
  duration_ms: 0.102
  severity: fail
  stack: |-
    assert.js:44
      throw new errors.AssertionError({
      ^
    
    AssertionError [ERR_ASSERTION]: 'ENOTSOCK' === 'EINVAL'
        at Server.onError (/home/iojs/build/workspace/node-test-commit-linux/nodes/ubuntu1604-intel-64/test/parallel/test-listen-fd-ebadf.js:33:10)
        at Server.<anonymous> (/home/iojs/build/workspace/node-test-commit-linux/nodes/ubuntu1604-intel-64/test/common/index.js:514:15)
@lpinca

This comment has been minimized.

Show comment
Hide comment
@lpinca

lpinca Sep 20, 2017

Member

@BridgeAR yes that test has nothing to do with the change proposed here.

Member

lpinca commented Sep 20, 2017

@BridgeAR yes that test has nothing to do with the change proposed here.

@BridgeAR

This comment has been minimized.

Show comment
Hide comment
@BridgeAR

BridgeAR Sep 20, 2017

Member

Landed in 10be20a

Member

BridgeAR commented Sep 20, 2017

Landed in 10be20a

@BridgeAR BridgeAR closed this Sep 20, 2017

BridgeAR added a commit that referenced this pull request Sep 20, 2017

http: set socket timeout when socket connects
`request.setTimeout()` calls `socket.setTimeout()` as soon as a socket
is assigned to the request. This makes the `timeout` event to be
emitted on the request even if the underlying socket never connects.

This commit makes `socket.setTimeout()` to be called only when the
underlying socket is connected.

PR-URL: #8895
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

@lpinca lpinca deleted the lpinca:fix/request-set-timeout branch Sep 20, 2017

Qard pushed a commit to Qard/ayo that referenced this pull request Sep 21, 2017

http: set socket timeout when socket connects
`request.setTimeout()` calls `socket.setTimeout()` as soon as a socket
is assigned to the request. This makes the `timeout` event to be
emitted on the request even if the underlying socket never connects.

This commit makes `socket.setTimeout()` to be called only when the
underlying socket is connected.

PR-URL: nodejs/node#8895
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

Qard pushed a commit to Qard/ayo that referenced this pull request Sep 21, 2017

http: set socket timeout when socket connects
`request.setTimeout()` calls `socket.setTimeout()` as soon as a socket
is assigned to the request. This makes the `timeout` event to be
emitted on the request even if the underlying socket never connects.

This commit makes `socket.setTimeout()` to be called only when the
underlying socket is connected.

PR-URL: nodejs/node#8895
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

jasnell added a commit that referenced this pull request Oct 17, 2017

2017-10-31, Version 9.0.0 (Current)
* **async_hooks**
  * Older experimental `async_hooks` APIs have been removed
    [[`d731369b1d`](d731369)]
    **(SEMVER-MAJOR)** [#14414](#14414)

* **Errors**
  * Multiple built in modules have been migrated to use static error codes

* **Domains**
  * The long deprecated `.dispose()` method has been removed
    [[`602fd36d95`](602fd36)]
    **(SEMVER-MAJOR)** [#15412](#15412)

* **File system**
  * `fs.ReadStream` and `fs.WriteStream` now make use of `.destroy()`
    [[`e5c290bed9`](e5c290b)]
    **(SEMVER-MAJOR)** [#15407](#15407)
  * `fs` callbacks are now invoked with an undefined `this` context
    [[`2249234fee`](2249234)]
    **(SEMVER-MAJOR)** [#14645](#14645)

* **HTTP**
  * Socket timeout is set when the socket connects
    [[`10be20a0e8`](10be20a)]
    **(SEMVER-MAJOR)** [#8895](#8895)
  * A bug causing the request `error` event to fire twice has been fixed
    [[`620ba41694`](620ba41)]
    **(SEMVER-MAJOR)** [#14659](#14659)
  * The `pipe` method on `OutgoingMessage` has been disabled
    [[`156549d8ff`](156549d)]
    **(SEMVER-MAJOR)** [#14358](#14358)

* **HTTP/2**
  * The `--expose-http2` command-line argument is no longer required
    [[`f55ee6e24a`](f55ee6e)]
    **(SEMVER-MAJOR)** [#15535](#15535)

* **Internationalization**
  * The `Intl.v8BreakIterator` class has been removed
    [[`668ad44922`](668ad44)]
    **(SEMVER-MAJOR)** [#15238](#15238)

* **OS**
  * `os.EOL` is now read-only
    [[`f6caeb9526`](f6caeb9)]
    **(SEMVER-MAJOR)** [#14622](#14622)

* **Process**
  * It is now possible to pass additional flags to `dlopen`
    [[`5f22375922`](5f22375)]
    **(SEMVER-MAJOR)** [#12794](#12794)

* **Timers**
  * Using a timeout duration larger than 32-bits will now emit a warning
    [[`ce3586da31`](ce3586d)]
    **(SEMVER-MAJOR)** [#15627](#15627)

* **TLS**
  * `parseCertString` has been deprecated
    [[`468110b327`](468110b)]
    **(SEMVER-MAJOR)** [#14249](#14249)
  * Type-checking for `key`, `cert`, and `ca` options has been added
    [[`a7dccd040d`](a7dccd0)]
    **(SEMVER-MAJOR)** [#14807](#14807)

jasnell added a commit that referenced this pull request Oct 29, 2017

2017-10-31, Version 9.0.0 (Current)
* **async_hooks**
  * Older experimental `async_hooks` APIs have been removed
    [[`d731369b1d`](d731369)]
    **(SEMVER-MAJOR)** [#14414](#14414)

* **Errors**
  * Multiple built in modules have been migrated to use static error codes

* **Domains**
  * The long deprecated `.dispose()` method has been removed
    [[`602fd36d95`](602fd36)]
    **(SEMVER-MAJOR)** [#15412](#15412)

* **File system**
  * `fs.ReadStream` and `fs.WriteStream` now make use of `.destroy()`
    [[`e5c290bed9`](e5c290b)]
    **(SEMVER-MAJOR)** [#15407](#15407)
  * `fs` callbacks are now invoked with an undefined `this` context
    [[`2249234fee`](2249234)]
    **(SEMVER-MAJOR)** [#14645](#14645)

* **HTTP**
  * Socket timeout is set when the socket connects
    [[`10be20a0e8`](10be20a)]
    **(SEMVER-MAJOR)** [#8895](#8895)
  * A bug causing the request `error` event to fire twice has been fixed
    [[`620ba41694`](620ba41)]
    **(SEMVER-MAJOR)** [#14659](#14659)
  * The `pipe` method on `OutgoingMessage` has been disabled
    [[`156549d8ff`](156549d)]
    **(SEMVER-MAJOR)** [#14358](#14358)

* **HTTP/2**
  * The `--expose-http2` command-line argument is no longer required
    [[`f55ee6e24a`](f55ee6e)]
    **(SEMVER-MAJOR)** [#15535](#15535)

* **Internationalization**
  * The `Intl.v8BreakIterator` class has been removed
    [[`668ad44922`](668ad44)]
    **(SEMVER-MAJOR)** [#15238](#15238)

* **OS**
  * `os.EOL` is now read-only
    [[`f6caeb9526`](f6caeb9)]
    **(SEMVER-MAJOR)** [#14622](#14622)

* **Process**
  * It is now possible to pass additional flags to `dlopen`
    [[`5f22375922`](5f22375)]
    **(SEMVER-MAJOR)** [#12794](#12794)

* **Timers**
  * Using a timeout duration larger than 32-bits will now emit a warning
    [[`ce3586da31`](ce3586d)]
    **(SEMVER-MAJOR)** [#15627](#15627)

* **TLS**
  * `parseCertString` has been deprecated
    [[`468110b327`](468110b)]
    **(SEMVER-MAJOR)** [#14249](#14249)
  * Type-checking for `key`, `cert`, and `ca` options has been added
    [[`a7dccd040d`](a7dccd0)]
    **(SEMVER-MAJOR)** [#14807](#14807)

jasnell added a commit that referenced this pull request Oct 29, 2017

2017-10-31, Version 9.0.0 (Current)
* **async_hooks**
  * Older experimental `async_hooks` APIs have been removed
    [[`d731369b1d`](d731369)]
    **(SEMVER-MAJOR)** [#14414](#14414)

* **Errors**
  * Multiple built in modules have been migrated to use static error codes

* **Domains**
  * The long deprecated `.dispose()` method has been removed
    [[`602fd36d95`](602fd36)]
    **(SEMVER-MAJOR)** [#15412](#15412)

* **File system**
  * `fs.ReadStream` and `fs.WriteStream` now make use of `.destroy()`
    [[`e5c290bed9`](e5c290b)]
    **(SEMVER-MAJOR)** [#15407](#15407)
  * `fs` callbacks are now invoked with an undefined `this` context
    [[`2249234fee`](2249234)]
    **(SEMVER-MAJOR)** [#14645](#14645)

* **HTTP**
  * Socket timeout is set when the socket connects
    [[`10be20a0e8`](10be20a)]
    **(SEMVER-MAJOR)** [#8895](#8895)
  * A bug causing the request `error` event to fire twice has been fixed
    [[`620ba41694`](620ba41)]
    **(SEMVER-MAJOR)** [#14659](#14659)
  * The `pipe` method on `OutgoingMessage` has been disabled
    [[`156549d8ff`](156549d)]
    **(SEMVER-MAJOR)** [#14358](#14358)

* **HTTP/2**
  * The `--expose-http2` command-line argument is no longer required
    [[`f55ee6e24a`](f55ee6e)]
    **(SEMVER-MAJOR)** [#15535](#15535)

* **Internationalization**
  * The `Intl.v8BreakIterator` class has been removed
    [[`668ad44922`](668ad44)]
    **(SEMVER-MAJOR)** [#15238](#15238)

* **OS**
  * `os.EOL` is now read-only
    [[`f6caeb9526`](f6caeb9)]
    **(SEMVER-MAJOR)** [#14622](#14622)

* **Process**
  * It is now possible to pass additional flags to `dlopen`
    [[`5f22375922`](5f22375)]
    **(SEMVER-MAJOR)** [#12794](#12794)

* **Timers**
  * Using a timeout duration larger than 32-bits will now emit a warning
    [[`ce3586da31`](ce3586d)]
    **(SEMVER-MAJOR)** [#15627](#15627)

* **TLS**
  * `parseCertString` has been deprecated
    [[`468110b327`](468110b)]
    **(SEMVER-MAJOR)** [#14249](#14249)
  * Type-checking for `key`, `cert`, and `ca` options has been added
    [[`a7dccd040d`](a7dccd0)]
    **(SEMVER-MAJOR)** [#14807](#14807)

jasnell added a commit that referenced this pull request Oct 29, 2017

2017-10-31, Version 9.0.0 (Current)
* **async_hooks**
  * Older experimental `async_hooks` APIs have been removed
    [[`d731369b1d`](d731369)]
    **(SEMVER-MAJOR)** [#14414](#14414)

* **Errors**
  * Multiple built in modules have been migrated to use static error codes

* **Domains**
  * The long deprecated `.dispose()` method has been removed
    [[`602fd36d95`](602fd36)]
    **(SEMVER-MAJOR)** [#15412](#15412)

* **File system**
  * `fs.ReadStream` and `fs.WriteStream` now make use of `.destroy()`
    [[`e5c290bed9`](e5c290b)]
    **(SEMVER-MAJOR)** [#15407](#15407)
  * `fs` callbacks are now invoked with an undefined `this` context
    [[`2249234fee`](2249234)]
    **(SEMVER-MAJOR)** [#14645](#14645)

* **HTTP**
  * Socket timeout is set when the socket connects
    [[`10be20a0e8`](10be20a)]
    **(SEMVER-MAJOR)** [#8895](#8895)
  * A bug causing the request `error` event to fire twice has been fixed
    [[`620ba41694`](620ba41)]
    **(SEMVER-MAJOR)** [#14659](#14659)
  * The `pipe` method on `OutgoingMessage` has been disabled
    [[`156549d8ff`](156549d)]
    **(SEMVER-MAJOR)** [#14358](#14358)

* **HTTP/2**
  * The `--expose-http2` command-line argument is no longer required
    [[`f55ee6e24a`](f55ee6e)]
    **(SEMVER-MAJOR)** [#15535](#15535)

* **Internationalization**
  * The `Intl.v8BreakIterator` class has been removed
    [[`668ad44922`](668ad44)]
    **(SEMVER-MAJOR)** [#15238](#15238)

* **OS**
  * `os.EOL` is now read-only
    [[`f6caeb9526`](f6caeb9)]
    **(SEMVER-MAJOR)** [#14622](#14622)

* **Process**
  * It is now possible to pass additional flags to `dlopen`
    [[`5f22375922`](5f22375)]
    **(SEMVER-MAJOR)** [#12794](#12794)

* **Timers**
  * Using a timeout duration larger than 32-bits will now emit a warning
    [[`ce3586da31`](ce3586d)]
    **(SEMVER-MAJOR)** [#15627](#15627)

* **TLS**
  * `parseCertString` has been deprecated
    [[`468110b327`](468110b)]
    **(SEMVER-MAJOR)** [#14249](#14249)
  * Type-checking for `key`, `cert`, and `ca` options has been added
    [[`a7dccd040d`](a7dccd0)]
    **(SEMVER-MAJOR)** [#14807](#14807)

jasnell added a commit that referenced this pull request Oct 30, 2017

2017-10-31, Version 9.0.0 (Current)
* **async_hooks**
  * Older experimental `async_hooks` APIs have been removed
    [[`d731369b1d`](d731369)]
    **(SEMVER-MAJOR)** [#14414](#14414)

* **Errors**
  * Multiple built in modules have been migrated to use static error codes

* **Domains**
  * The long deprecated `.dispose()` method has been removed
    [[`602fd36d95`](602fd36)]
    **(SEMVER-MAJOR)** [#15412](#15412)

* **File system**
  * `fs.ReadStream` and `fs.WriteStream` now make use of `.destroy()`
    [[`e5c290bed9`](e5c290b)]
    **(SEMVER-MAJOR)** [#15407](#15407)
  * `fs` callbacks are now invoked with an undefined `this` context
    [[`2249234fee`](2249234)]
    **(SEMVER-MAJOR)** [#14645](#14645)

* **HTTP**
  * Socket timeout is set when the socket connects
    [[`10be20a0e8`](10be20a)]
    **(SEMVER-MAJOR)** [#8895](#8895)
  * A bug causing the request `error` event to fire twice has been fixed
    [[`620ba41694`](620ba41)]
    **(SEMVER-MAJOR)** [#14659](#14659)
  * The `pipe` method on `OutgoingMessage` has been disabled
    [[`156549d8ff`](156549d)]
    **(SEMVER-MAJOR)** [#14358](#14358)

* **HTTP/2**
  * The `--expose-http2` command-line argument is no longer required
    [[`f55ee6e24a`](f55ee6e)]
    **(SEMVER-MAJOR)** [#15535](#15535)

* **Internationalization**
  * The `Intl.v8BreakIterator` class has been removed
    [[`668ad44922`](668ad44)]
    **(SEMVER-MAJOR)** [#15238](#15238)

* **OS**
  * `os.EOL` is now read-only
    [[`f6caeb9526`](f6caeb9)]
    **(SEMVER-MAJOR)** [#14622](#14622)

* **Process**
  * It is now possible to pass additional flags to `dlopen`
    [[`5f22375922`](5f22375)]
    **(SEMVER-MAJOR)** [#12794](#12794)

* **Timers**
  * Using a timeout duration larger than 32-bits will now emit a warning
    [[`ce3586da31`](ce3586d)]
    **(SEMVER-MAJOR)** [#15627](#15627)

* **TLS**
  * `parseCertString` has been deprecated
    [[`468110b327`](468110b)]
    **(SEMVER-MAJOR)** [#14249](#14249)
  * Type-checking for `key`, `cert`, and `ca` options has been added
    [[`a7dccd040d`](a7dccd0)]
    **(SEMVER-MAJOR)** [#14807](#14807)

lpinca added a commit to lpinca/node that referenced this pull request Nov 4, 2017

http: use 'connect' event only if socket is connecting
Fixes a bug that prevented `ClientRequest.prototype.setTimeout()` from
working properly when the socket was reused for multiple requests.

Fixes: nodejs#16716
Refs: nodejs#8895

lpinca added a commit to lpinca/node that referenced this pull request Nov 6, 2017

http: use 'connect' event only if socket is connecting
Fixes a bug that prevented `ClientRequest.prototype.setTimeout()` from
working properly when the socket was reused for multiple requests.

Fixes: nodejs#16716
Refs: nodejs#8895

lpinca added a commit that referenced this pull request Nov 6, 2017

http: use 'connect' event only if socket is connecting
Fixes a bug that prevented `ClientRequest.prototype.setTimeout()` from
working properly when the socket was reused for multiple requests.

Fixes: #16716
Refs: #8895
PR-URL: #16725
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>

cjihrig added a commit to cjihrig/node-1 that referenced this pull request Nov 6, 2017

http: use 'connect' event only if socket is connecting
Fixes a bug that prevented `ClientRequest.prototype.setTimeout()` from
working properly when the socket was reused for multiple requests.

Fixes: nodejs#16716
Refs: nodejs#8895
PR-URL: nodejs#16725
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>

msoechting added a commit to hpicgs/node that referenced this pull request Feb 7, 2018

http: use 'connect' event only if socket is connecting
Fixes a bug that prevented `ClientRequest.prototype.setTimeout()` from
working properly when the socket was reused for multiple requests.

Fixes: nodejs#16716
Refs: nodejs#8895
PR-URL: nodejs#16725
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment