code: func connectSocket(ctx context.Context) net.Conn {
  
  	timeoutChan := time.After(SocketTimeout)
  
  	var c net.Conn
  	err := errors.New("Not yet connected")
  	for err != nil {
  		select {
  		case <-timeoutChan:
  			panic("Can't connect to pfconfig socket")
  		default:
  			// We try to connect to the pfconfig socket
  			// If we fail, we will wait a second before leaving this scope
  			// Otherwise, we continue and the for loop will detect the connection is valid since err will be nil
  			c, err = net.Dial("unix", getPfconfigSocketPath())
  			if err != nil {
  				log.LoggerWContext(ctx).Error("Cannot connect to pfconfig socket...")
  				time.Sleep(1 * time.Second)
  			}
  		}
  	}
  
  	return c
  }
docs: // Connect to the pfconfig socket
  // If it fails to connect, it will try it every second up to the time defined in SocketTimeout
  // After SocketTimeout is reached, this will panic