code: private void checkSubscription(Subscriber<? super T> subscriber) {
          if (subscriber.isUnsubscribed()) {
              keepGoing = false;
              log.debug("unsubscribing");
          }
      }
docs: If subscribe unsubscribed sets keepGoing to false.
  
  @param subscriber