diff --git a/doc/api/diagnostics_channel.md b/doc/api/diagnostics_channel.md index 52a9ac9808414a..47df6a42994257 100644 --- a/doc/api/diagnostics_channel.md +++ b/doc/api/diagnostics_channel.md @@ -267,7 +267,7 @@ added: changes: - version: REPLACEME pr-url: https://github.com/nodejs/node/pull/40433 - description: Added return value. + description: Added return value. Added to channels without subscribers. --> * `onMessage` {Function} The previous subscribed handler to remove diff --git a/lib/diagnostics_channel.js b/lib/diagnostics_channel.js index 813cda5bb3e83a..c85a9532b4d372 100644 --- a/lib/diagnostics_channel.js +++ b/lib/diagnostics_channel.js @@ -81,6 +81,10 @@ class Channel { this.subscribe(subscription); } + unsubscribe() { + return false; + } + get hasSubscribers() { return false; }