Skip to content

Commit aa04a2c

Browse files
RafaelGSSdanielleadams
authored andcommitted
doc: add usage recommendation for writable._destroy
PR-URL: #41040 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent e444b41 commit aa04a2c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/api/stream.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2639,6 +2639,8 @@ added: v8.0.0
26392639

26402640
The `_destroy()` method is called by [`writable.destroy()`][writable-destroy].
26412641
It can be overridden by child classes but it **must not** be called directly.
2642+
Furthermore, the `callback` should not be mixed with async/await
2643+
once it is executed when a promise is resolved.
26422644

26432645
#### `writable._final(callback)`
26442646

0 commit comments

Comments
 (0)