public final void setUpstreamSubscription(Subscription subscription) {
        requireNonNull(subscription, "subscription");
        assert executor.inEventLoop();

        final Subscription previous = newSubscription;
        if (previous == NoopSubscription.get()) {
            // Cancelled already
            subscription.cancel();
            return;
        }
        newSubscription = subscription;

        drain();
    }
Set the new subscription to resume with.
@param subscription the new subscription
core/src/main/java/com/linecorp/armeria/internal/common/stream/SubscriptionArbiter.java