Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1ddbae2

Browse filesBrowse files
simon-idtargos
authored andcommitted
lib: add unsubscribe method to non-active DC channels
PR-URL: #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>
1 parent aa61551 commit 1ddbae2
Copy full SHA for 1ddbae2

File tree

Expand file treeCollapse file tree

2 files changed

+5
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-1
lines changed
Open diff view settings
Collapse file

‎doc/api/diagnostics_channel.md‎

Copy file name to clipboardExpand all lines: doc/api/diagnostics_channel.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ added:
267267
changes:
268268
- version: REPLACEME
269269
pr-url: https://github.com/nodejs/node/pull/40433
270-
description: Added return value.
270+
description: Added return value. Added to channels without subscribers.
271271
-->
272272

273273
* `onMessage` {Function} The previous subscribed handler to remove
Collapse file

‎lib/diagnostics_channel.js‎

Copy file name to clipboardExpand all lines: lib/diagnostics_channel.js
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ class Channel {
8181
this.subscribe(subscription);
8282
}
8383

84+
unsubscribe() {
85+
return false;
86+
}
87+
8488
get hasSubscribers() {
8589
return false;
8690
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.