Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 06752d1

Browse filesBrowse files
bnoordhuisMylesBorins
authored andcommitted
net: remove misleading comment
The allowHalfOpen comment was added in commit 8a3befa ("net: Refactor to use streams2") from 2012 but it wasn't true even then as far as I can tell: Node.js simply always does a shutdown(2) first. It is true that streams2 withholds the 'end' event when allowHalfOpen is true but the comment is about a callback that hangs off the 'finish' event that is emitted after calling `socket.end()`. PR-URL: #11573 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent c0663e5 commit 06752d1
Copy full SHA for 06752d1

File tree

Expand file treeCollapse file tree

1 file changed

+0
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-4
lines changed
Open diff view settings
Collapse file

‎lib/net.js‎

Copy file name to clipboardExpand all lines: lib/net.js
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,6 @@ Socket.prototype._unrefTimer = function _unrefTimer() {
205205

206206
// the user has called .end(), and all the bytes have been
207207
// sent out to the other side.
208-
// If allowHalfOpen is false, or if the readable side has
209-
// ended already, then destroy.
210-
// If allowHalfOpen is true, then we need to do a shutdown,
211-
// so that only the writable side will be cleaned up.
212208
function onSocketFinish() {
213209
// If still connecting - defer handling 'finish' until 'connect' will happen
214210
if (this.connecting) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.