Skip to content
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

zipAll doesn't call complete on an empty stream #2426

Closed
KMax opened this issue Feb 28, 2017 · 5 comments
Closed

zipAll doesn't call complete on an empty stream #2426

KMax opened this issue Feb 28, 2017 · 5 comments
Labels
bug Confirmed bug

Comments

@KMax
Copy link

KMax commented Feb 28, 2017

RxJS version:
5.0.1 (locally)
I don't know which version is used in JS Bin (link below).
Code to reproduce:
Source: http://jsbin.com/jeyuqojopi/edit?js,console

const source = Rx.Observable.empty();

source.map((v) => Rx.Observable.of(v+1)).subscribe({
  next: (_) => console.log("next"),
  complete: () => console.log("complete")
});

source.map((v) => Rx.Observable.of(v+1)).zipAll().subscribe({
  next: (v) => console.log(v),
  complete: () => console.log("complete")
});

Expected behavior:
In console:

"complete"
"complete"

Actual behavior:
In console:

"complete"

Additional information:
I'm not sure whether it's a bug. If it's not a bug, could you share an idea how to achieve the expected behavior. Thank you!

@trxcllnt trxcllnt added the bug Confirmed bug label Feb 28, 2017
@KMax
Copy link
Author

KMax commented Mar 5, 2017

A workaround is to replace .zipAll() with .combineAll() method. Not sure what's the difference between them, but it works for my use case.

@martinsik
Copy link
Contributor

martinsik commented Mar 7, 2017

@KMax Isn't the zip() example equivalent to the following?

Rx.Observable.zip(source.map((v) => Rx.Observable.of(v+1))).subscribe({
  next: (v) => console.log(v),
  complete: () => console.log("complete")
});

This will send proper complete notification.

@KMax
Copy link
Author

KMax commented Mar 9, 2017

@martinsik It looks like an equivalent, yes. Thank you!

@kwonoj
Copy link
Member

kwonoj commented Apr 16, 2017

closed via #2451.

@kwonoj kwonoj closed this as completed Apr 16, 2017
@lock
Copy link

lock bot commented Jun 6, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Confirmed bug
Projects
None yet
Development

No branches or pull requests

4 participants