code: private Status statusFromFailedFuture(ChannelFuture f) {
      Throwable t = f.cause();
      if (t instanceof ClosedChannelException
          // Exception thrown by the StreamBufferingEncoder if the channel is closed while there
          // are still streams buffered. This exception is not helpful. Replace it by the real
          // cause of the shutdown (if available).
          || t instanceof Http2ChannelClosedException) {
        Status shutdownStatus = lifecycleManager.getShutdownStatus();
        if (shutdownStatus == null) {
          return Status.UNKNOWN.withDescription("Channel closed but for unknown reason")
              .withCause(new ClosedChannelException().initCause(t));
        }
        return shutdownStatus;
      }
      return Utils.statusFromThrowable(t);
    }
docs: Convert ChannelFuture.cause() to a Status, taking into account that all handlers are removed
  from the pipeline when the channel is closed. Since handlers are removed, you may get an
  unhelpful exception like ClosedChannelException.
  
  <p>This method must only be called on the event loop.