code: @Override
      public void closeStreamRemote(Http2Stream stream, ChannelFuture future) {
          switch (stream.state()) {
              case HALF_CLOSED_REMOTE:
              case OPEN:
                  stream.closeRemoteSide();
                  break;
              default:
                  closeStream(stream, future);
                  break;
          }
      }
docs: Closes the remote side of the given stream. If this causes the stream to be closed, adds a
  hook to close the channel after the given future completes.
  
  @param stream the stream to be half closed.
  @param future If closing, the future after which to close the channel.