Skip to content

Commit

Permalink
Remove listener after evaluating update to prevent leaking listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
jwolski committed Oct 3, 2015
1 parent de4a510 commit bf1dbce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/membership/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ Membership.prototype.update = function update(changes, isLocal) {
// One-time subscription for batching applied updates
member.once('updated', onMemberUpdated);
member.evaluateUpdate(change);
member.removeListener('updated', onMemberUpdated);
}

if (updates.length > 0) {
Expand Down

0 comments on commit bf1dbce

Please sign in to comment.