Skip to content

1.x: fix concatMap scalar/empty source behavior #3840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 8, 2016

Conversation

akarnokd
Copy link
Member

@akarnokd akarnokd commented Apr 7, 2016

There were two tiny problems with the rewritten concatMap operator, mainly due to copy-paste error:

  • When a scalar was concatenated, the active field was not set and thus the next prefetched source overwrote it.
  • When the scalar was set on the arbiter, its custom producer didn't check for n > 0 zero causing instant emission always. Generally Producer.request(0) is allowed and should be no-op (unlike RS).
  • When an empty() was encountered as a last source, the it didn't trigger the check for completion afterwards.

@akarnokd akarnokd added the Bug label Apr 7, 2016
@akarnokd akarnokd changed the title 1.x: fix concatMap scalar source behavior 1.x: fix concatMap scalar/empty source behavior Apr 7, 2016
@zsxwing
Copy link
Member

zsxwing commented Apr 8, 2016

👍

@zsxwing zsxwing merged commit dc5f4c3 into ReactiveX:1.x Apr 8, 2016
@stevegury
Copy link
Member

👍

@akarnokd akarnokd deleted the ConcatMapFix branch June 28, 2016 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants