Skip to content

Commit 36d9c08

Browse files
RafaelGSSLinkgoron
authored andcommitted
doc: add usage recommendation for writable._destroy
PR-URL: nodejs#41040 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 616fe4e commit 36d9c08

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
@@ -2743,6 +2743,8 @@ added: v8.0.0
27432743

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

27472749
#### `writable._final(callback)`
27482750

0 commit comments

Comments
 (0)