From 9fbf8a1c8617539855d637a9325cf5de7701ce17 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Tue, 1 Oct 2019 20:44:02 +0200 Subject: [PATCH 1/2] stream: added note about undocumented API --- 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..aba31ccaa09827 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. +// cb() well be invoked synchronously if _destroy is synchronous. function destroy(err, cb) { const r = this._readableState; const w = this._writableState; From 4c56e4cd7222bf5374503dacd018eaed78d07ab1 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Tue, 1 Oct 2019 20:51:40 +0200 Subject: [PATCH 2/2] fixup: typo --- lib/internal/streams/destroy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/streams/destroy.js b/lib/internal/streams/destroy.js index aba31ccaa09827..ded75b255934c4 100644 --- a/lib/internal/streams/destroy.js +++ b/lib/internal/streams/destroy.js @@ -23,7 +23,7 @@ function needError(stream, err) { } // Undocumented cb() API, needed for core, not for public API. -// cb() well be invoked synchronously if _destroy is synchronous. +// The cb() will be invoked synchronously if _destroy is synchronous. function destroy(err, cb) { const r = this._readableState; const w = this._writableState;