docs: private void closeStream(final Throwable throwable) {
      if (stream != null) {
        stream.onCompleted();
        stream = null;
      }
  
      if (isActive.getAndSet(false)) {
        userCallbackExecutor.execute(
            new Runnable() {
              @Override
              public void run() {
                listener.onEvent(
                    null,
                    throwable instanceof FirestoreException
                        ? (FirestoreException) throwable
                        : FirestoreException.apiException(
                            new ApiException(
                                throwable,
                                GrpcStatusCode.of(getStatus(throwable).getCode()),
                                false)));
              }
            });
      }
    }