Skip to content

Probable bug in ObserveOnSubscriber #3889

@SammyVimes

Description

@SammyVimes

In init method ObserveOnSubscriber::requested is updated but Subscriber::requested is not.

I think it should be something like this:

localChild.setProducer(new Producer() {

      @Override
      public void request(long n) {
           if (n > 0L) {
                 BackpressureUtils.getAndAddRequest(requested, n);
                 ObserveOnSubscriber.this.request(requested.get());
                 schedule();
            }
       }

});

Otherwise, subscribers that wrap ObserveOnSubscriber (that wraps subscriber with requested value NOT_SET) gets bufferSize as requested value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions