code: private ChannelFuture resetUnknownStream(final ChannelHandlerContext ctx, int streamId, long errorCode,
                                               ChannelPromise promise) {
          ChannelFuture future = frameWriter().writeRstStream(ctx, streamId, errorCode, promise);
          if (future.isDone()) {
              closeConnectionOnError(ctx, future);
          } else {
              future.addListener(new ChannelFutureListener() {
                  @Override
                  public void operationComplete(ChannelFuture future) throws Exception {
                      closeConnectionOnError(ctx, future);
                  }
              });
          }
          return future;
      }
docs: Sends a {@code RST_STREAM} frame even if we don't know about the stream. This error condition is most likely
  triggered by the first frame of a stream being invalid. That is, there was an error reading the frame before
  we could create a new stream.