Skip to content

fix: correct MemberAdded event remove accessor#280

Merged
sakno merged 1 commit intodotnet:developfrom
specula-org:fix/member-added-event-remove-accessor
Mar 25, 2026
Merged

fix: correct MemberAdded event remove accessor#280
sakno merged 1 commit intodotnet:developfrom
specula-org:fix/member-added-event-remove-accessor

Conversation

@Qian-Cheng-nju
Copy link
Copy Markdown
Contributor

Hi, great library — thanks for maintaining it!

We noticed a small copy-paste issue in the MemberAdded event and put together a fix. Should be straightforward to review.

In RaftCluster.Membership.cs, the MemberAdded event's remove accessor targets memberRemovedHandlers instead of memberAddedHandlers. This means unsubscribing from MemberAdded never actually removes the handler (memory leak), and accidentally removes a MemberRemoved handler instead.

The MemberRemoved event right below it (line 121) is wired correctly, so this is just a typo in the copy.

@sakno
Copy link
Copy Markdown
Collaborator

sakno commented Mar 25, 2026

Many thanks for your contribution! Could you please change the destination branch to develop?

@sakno sakno added the Lib:Cluster DotNext.Net.Cluster library label Mar 25, 2026
@sakno sakno self-requested a review March 25, 2026 12:20
@sakno sakno added this to Cluster Mar 25, 2026
@github-project-automation github-project-automation bot moved this to Opened in Cluster Mar 25, 2026
@Qian-Cheng-nju Qian-Cheng-nju changed the base branch from master to develop March 25, 2026 12:21
@Qian-Cheng-nju
Copy link
Copy Markdown
Contributor Author

Done, changed the base branch to develop. Thanks!

@sakno sakno merged commit b7f03b2 into dotnet:develop Mar 25, 2026
3 of 5 checks passed
@github-project-automation github-project-automation bot moved this from Opened to Closed in Cluster Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Lib:Cluster DotNext.Net.Cluster library

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

2 participants