code: func (a *AddrManager) Stop() error {
  	if atomic.AddInt32(&a.shutdown, 1) != 1 {
  		log.Warnf("Address manager is already in the process of " +
  			"shutting down")
  		return nil
  	}
  
  	log.Infof("Address manager shutting down")
  	close(a.quit)
  	a.wg.Wait()
  	return nil
  }
docs: // Stop gracefully shuts down the address manager by stopping the main handler.