mirror of
https://github.com/nodejs/node.git
synced 2025-12-28 16:07:39 +00:00
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:
parent
d0670e7559
commit
07bbb07119
@ -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
|
||||
|
||||
@ -81,6 +81,10 @@ class Channel {
|
||||
this.subscribe(subscription);
|
||||
}
|
||||
|
||||
unsubscribe() {
|
||||
return false;
|
||||
}
|
||||
|
||||
get hasSubscribers() {
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user