code: func (m *Main) Close() (info dt.TargetLogIndex, err error) {
  	m.mu.Lock()
  	defer m.mu.Unlock()
  	m.logger.Println("discoverd shutting down")
  	if m.httpServer != nil {
  		// Disable keep alives so that persistent connections will close
  		m.httpServer.SetKeepAlivesEnabled(false)
  	}
  	if m.dnsServer != nil {
  		m.dnsServer.Close()
  		m.dnsServer = nil
  	}
  	if m.ln != nil {
  		m.ln.Close()
  		m.ln = nil
  	}
  	if m.store != nil {
  		info.LastIndex, err = m.store.Close()
  		m.store = nil
  	}
  	return info, err
  }
docs: // Close shuts down all open servers.