class ResourceSubscriber implements FlowableSubscriber<T>, Disposable {

    @Override
    public final void onSubscribe(Subscription s) {
        if (EndConsumerHelper.setOnce(this.s, s, getClass())) {
            long r = missedRequested.getAndSet(0L);
            if (r != 0L) {
                s.request(r);
            }
            onStart();
        }
    }

}