code: @Override
    public void channelInactive(ChannelHandlerContext ctx) throws Exception {
      try {
        if (keepAliveManager != null) {
          keepAliveManager.onTransportTermination();
        }
        if (maxConnectionIdleManager != null) {
          maxConnectionIdleManager.onTransportTermination();
        }
        if (maxConnectionAgeMonitor != null) {
          maxConnectionAgeMonitor.cancel(false);
        }
        final Status status =
            Status.UNAVAILABLE.withDescription("connection terminated for unknown reason");
        // Any streams that are still active must be closed
        connection().forEachActiveStream(new Http2StreamVisitor() {
          @Override
          public boolean visit(Http2Stream stream) throws Http2Exception {
            NettyServerStream.TransportState serverStream = serverStream(stream);
            if (serverStream != null) {
              serverStream.transportReportStatus(status);
            }
            return true;
          }
        });
      } finally {
        super.channelInactive(ctx);
      }
    }
docs: Handler for the Channel shutting down.