lib: add unsubscribe method to non-active DC channels

PR-URL: https://github.com/nodejs/node/pull/40433
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
This commit is contained in:
simon-id authored and Richard Lau committed 2022-01-25 12:49:36 -05:00
1 parent 625be7585d
commit 004eafbebf
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -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
+4
View File
@@ -81,6 +81,10 @@ class Channel {
this.subscribe(subscription);
}
unsubscribe() {
return false;
}
get hasSubscribers() {
return false;
}