From aa04a2c5620fb203b685928ab7d8abbd612701b2 Mon Sep 17 00:00:00 2001 From: Rafael Gonzaga Date: Wed, 22 Dec 2021 13:51:16 -0300 Subject: [PATCH] doc: add usage recommendation for writable._destroy PR-URL: https://github.com/nodejs/node/pull/41040 Reviewed-By: Matteo Collina --- doc/api/stream.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/api/stream.md b/doc/api/stream.md index 2d6652c73a018b..22978c25622d6d 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2639,6 +2639,8 @@ added: v8.0.0 The `_destroy()` method is called by [`writable.destroy()`][writable-destroy]. It can be overridden by child classes but it **must not** be called directly. +Furthermore, the `callback` should not be mixed with async/await +once it is executed when a promise is resolved. #### `writable._final(callback)`