Commit Graph

2 Commits

Author SHA1 Message Date
simon-id
80b56bbab0
diagnostics_channel: fix unsubscribe during publish
PR-URL: https://github.com/nodejs/node/pull/55116
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
2024-10-14 10:55:39 +00:00
Gabriel Schulhof
eb504c9406 diagnostics_channel: fix last subscriber removal
When iterating over diagnostics channel subscribers, assume their count
is zero if the list of subscribers becomes undefined, because there may
be only one subscriber which may unsubscribe itself as part of its
onMessage handler.

Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/48933
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
2023-07-31 10:13:59 -07:00