dist/es/leader-election/index.js
function whenDeathListener(msg) {
      if (msg.context === 'leader' && msg.action === 'death') {
        leaderElector.applyOnce().then(function () {
          if (leaderElector.isLeader) finish();
        });
      }
    }
function whenDeathListener(msg) {
      if (msg.context === 'leader' && msg.action === 'death') {
        leaderElector.applyOnce().then(function () {
          if (leaderElector.isLeader) finish();
        });
      }
    }
function whenDeathListener ( msg ) { if ( msg . context === 'leader' && msg . action === 'death' ) { leaderElector . applyOnce ( ) . then ( function ( ) { if ( leaderElector . isLeader ) finish ( ) ; } ) ; } }
try when other leader dies
try when other leader dies