private void handleConnection(SocketChannel socketChannel) {
    try (socketChannel) {
      var request = receiveLines(socketChannel);

      sendLines(socketChannel, ACK_PACKET);

      CliResult result;
      try {
        result = myProcessor.apply(request);
      }
      catch (Throwable t) {
        LOG.error(t);
        var error = requireNonNullElse(t.getMessage(), "Unknown error");
        var message = BootstrapBundle.message("bootstrap.error.request.failed", myPid, t.getClass(), error, LoggerFactory.getLogFilePath());
        result = new CliResult(AppExitCodes.ACTIVATE_ERROR, message);
      }

      sendLines(socketChannel, List.of(String.valueOf(result.exitCode()), requireNonNullElse(result.message(), "")));
    }
    catch (IOException e) {
      LOG.warn(e);
    }
  }
private void handleConnection(SocketChannel socketChannel)