From 4fa1744e1108c34c5cdfba99249346830bb9cbe7 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Tue, 1 Oct 2019 20:44:02 +0200 Subject: [PATCH] stream: add comment about undocumented API PR-URL: https://github.com/nodejs/node/pull/29805 Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater Reviewed-By: Minwoo Jung Reviewed-By: Trivikram Kamat Reviewed-By: Luigi Pinca Reviewed-By: Masashi Hirano Reviewed-By: Colin Ihrig --- lib/internal/streams/destroy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/internal/streams/destroy.js b/lib/internal/streams/destroy.js index 8708ca022c7f8d..ded75b255934c4 100644 --- a/lib/internal/streams/destroy.js +++ b/lib/internal/streams/destroy.js @@ -22,7 +22,8 @@ function needError(stream, err) { return true; } -// Undocumented cb() API, needed for core, not for public API +// Undocumented cb() API, needed for core, not for public API. +// The cb() will be invoked synchronously if _destroy is synchronous. function destroy(err, cb) { const r = this._readableState; const w = this._writableState;