code: func (le *leaderElectionSvcImpl) waitForInterrupt(timeout time.Duration) {
  	le.logger.Debug(le.id, ": Entering")
  	defer le.logger.Debug(le.id, ": Exiting")
  	le.Lock()
  	le.sleeping = true
  	le.Unlock()
  
  	select {
  	case <-le.interruptChan:
  	case <-le.stopChan:
  		le.stopChan <- struct{}{}
  	case <-time.After(timeout):
  	}
  
  	le.Lock()
  	le.sleeping = false
  	// We drain the interrupt channel
  	// because we might get 2 leadership declarations messages
  	// while sleeping, but we would only read 1 of them in the select block above
  	le.drainInterruptChannel()
  	le.Unlock()
  }
docs: // waitForInterrupt sleeps until the interrupt channel is triggered
  // or given timeout expires