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 328a2c7

Browse filesBrowse files
BridgeARMylesBorins
authored andcommitted
stream: lazy load end-of-stream
PR-URL: #20567 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
1 parent bc6dbc3 commit 328a2c7
Copy full SHA for 328a2c7

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Open diff view settings
Collapse file

‎lib/internal/streams/pipeline.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/pipeline.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
'use strict';
55

6-
const eos = require('internal/streams/end-of-stream');
6+
let eos;
77

88
const {
99
ERR_MISSING_ARGS,
@@ -33,6 +33,7 @@ function destroyer(stream, reading, writing, callback) {
3333
closed = true;
3434
});
3535

36+
if (eos === undefined) eos = require('internal/streams/end-of-stream');
3637
eos(stream, { readable: reading, writable: writing }, (err) => {
3738
if (err) return callback(err);
3839
closed = true;

0 commit comments

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