code: protected void onConnectionError(ChannelHandlerContext ctx, boolean outbound,
                                       Throwable cause, Http2Exception http2Ex) {
          if (http2Ex == null) {
              http2Ex = new Http2Exception(INTERNAL_ERROR, cause.getMessage(), cause);
          }
  
          ChannelPromise promise = ctx.newPromise();
          ChannelFuture future = goAway(ctx, http2Ex, ctx.newPromise());
          if (http2Ex.shutdownHint() == Http2Exception.ShutdownHint.GRACEFUL_SHUTDOWN) {
              doGracefulShutdown(ctx, future, promise);
          } else {
              future.addListener(new ClosingChannelFutureListener(ctx, promise));
          }
      }
docs: Handler for a connection error. Sends a GO_AWAY frame to the remote endpoint. Once all
  streams are closed, the connection is shut down.
  
  @param ctx the channel context
  @param outbound {@code true} if the error was caused by an outbound operation.
  @param cause the exception that was caught
  @param http2Ex the {@link Http2Exception} that is embedded in the causality chain. This may
  be {@code null} if it's an unknown exception.