Skip to content

Commit

Permalink
emit destroying message right before ringpop is destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
ShanniLi committed Sep 24, 2015
1 parent ce260bc commit b52051a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,13 @@ function RingPop(options) {
require('util').inherits(RingPop, EventEmitter);

RingPop.prototype.destroy = function destroy() {
if (this.destroyed) {
return;
}

this.destroyed = true;
this.emit('destroying');

this.gossip.stop();
this.suspicion.stopAll();
this.membershipUpdateRollup.destroy();
Expand Down

0 comments on commit b52051a

Please sign in to comment.