code: func (db *Dashboard) Stop() error {
  	// Close the connection listener.
  	var errs []error
  	if err := db.listener.Close(); err != nil {
  		errs = append(errs, err)
  	}
  	// Close the collectors.
  	errc := make(chan error, 1)
  	for i := 0; i < 3; i++ {
  		db.quit <- errc
  		if err := <-errc; err != nil {
  			errs = append(errs, err)
  		}
  	}
  	// Close the connections.
  	db.lock.Lock()
  	for _, c := range db.conns {
  		if err := c.conn.Close(); err != nil {
  			c.logger.Warn("Failed to close connection", "err", err)
  		}
  	}
  	db.lock.Unlock()
  
  	// Wait until every goroutine terminates.
  	db.wg.Wait()
  	log.Info("Dashboard stopped")
  
  	var err error
  	if len(errs) > 0 {
  		err = fmt.Errorf("%v", errs)
  	}
  
  	return err
  }
docs: // Stop stops the data collection thread and the connection listener of the dashboard.
  // Implements the node.Service interface.