diff --git a/doc/api/diagnostics_channel.md b/doc/api/diagnostics_channel.md index 90a3b1fb6ba41c..dd265b00bfdbcf 100644 --- a/doc/api/diagnostics_channel.md +++ b/doc/api/diagnostics_channel.md @@ -162,7 +162,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 7860e8934494d2..64da7e726b07e8 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; }