Unverified Commit 10be20a0 authored by Luigi Pinca's avatar Luigi Pinca Committed by Ruben Bridgewater
Browse files

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: https://github.com/nodejs/node/pull/8895


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
Reviewed-By: default avatarJoyee Cheung <joyeec9h3@gmail.com>
parent c5eb5bfc
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment