code: func (c *Connection) connectLoop(connChan chan ConnectionEvent) {
  	reconnectAttempts := 0
  
  	// loop until connected
  	for {
  		if err := c.vppClient.WaitReady(); err != nil {
  			log.Warnf("wait ready failed: %v", err)
  		}
  		if err := c.connectVPP(); err == nil {
  			// signal connected event
  			connChan <- ConnectionEvent{Timestamp: time.Now(), State: Connected}
  			break
  		} else if reconnectAttempts < c.maxAttempts {
  			reconnectAttempts++
  			log.Errorf("connecting failed (attempt %d/%d): %v", reconnectAttempts, c.maxAttempts, err)
  			time.Sleep(c.recInterval)
  		} else {
  			connChan <- ConnectionEvent{Timestamp: time.Now(), State: Failed, Error: err}
  			return
  		}
  	}
  
  	// we are now connected, continue with health check loop
  	c.healthCheckLoop(connChan)
  }
docs: // connectLoop attempts to connect to VPP until it succeeds.
  // Then it continues with healthCheckLoop.