code: public void close(ErrorCode rstStatusCode, @Nullable IOException errorException)
        throws IOException {
      if (!closeInternal(rstStatusCode, errorException)) {
        return; // Already closed.
      }
      connection.writeSynReset(id, rstStatusCode);
    }
docs: Abnormally terminate this stream. This blocks until the {@code RST_STREAM} frame has been
  transmitted.