Commit 459f209 1 parent 1b32fc3 commit 459f209 Copy full SHA for 459f209
File tree 1 file changed +6
-0
lines changed
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 ();
@@ -1496,6 +1499,9 @@ the callback and passing the error as the first argument. This will cause an
1496
1499
on how the stream is being used. Using the callback ensures consistent and
1497
1500
predictable handling of errors.
1498
1501
1502
+ If a Readable stream pipes into a Writable stream when Writable emits an
1503
+ error, the Readable stream will be unpiped.
1504
+
1499
1505
``` js
1500
1506
const { Writable } = require (' stream' );
1501
1507
You can’t perform that action at this time.
0 commit comments