-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simplify code (move out socket timeout part)
- Loading branch information
Showing
1 changed file
with
13 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42f6998
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.
@floatdrop sorry to pester.
This slightly changes the behavior.
req.setTimeout()
sets the socket timeout as soon as a socket is assigned to the request, before the socket is connected, despite the documentation saying otherwise.With this change an
ESOCKETTIMEDOUT
error could be incorrectly raised even if the socket fails to connect. See nodejs/node#8895.42f6998
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.
@lpinca thanks for noticing!