File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -323,6 +323,9 @@ The `'unpipe'` event is emitted when the [`stream.unpipe()`][] method is called
323
323
on a [ Readable] [ ] stream, removing this [ Writable] [ ] from its set of
324
324
destinations.
325
325
326
+ This is also emitted in case this [ Writable] [ ] stream emits an error when a
327
+ [ Readable] [ ] stream pipes into it.
328
+
326
329
``` js
327
330
const writer = getWritableStreamSomehow ();
328
331
const reader = getReadableStreamSomehow ();
@@ -1485,6 +1488,9 @@ the callback and passing the error as the first argument. This will cause an
1485
1488
on how the stream is being used. Using the callback ensures consistent and
1486
1489
predictable handling of errors.
1487
1490
1491
+ If a Readable stream pipes into a Writable stream when Writable emits an
1492
+ error, the Readable stream will be unpiped.
1493
+
1488
1494
``` js
1489
1495
const { Writable } = require (' stream' );
1490
1496
You can’t perform that action at this time.
0 commit comments