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

2.x: Observable.repeatWhen doesn't call onComplete #4909

Closed
otal1105 opened this issue Dec 9, 2016 · 3 comments
Closed

2.x: Observable.repeatWhen doesn't call onComplete #4909

otal1105 opened this issue Dec 9, 2016 · 3 comments

Comments

@otal1105
Copy link

otal1105 commented Dec 9, 2016

I tried below

Observable.range(1, 3).repeatWhen(handler -> handler.take(2))
    .subscribe(
        System.out::println, 
        e -> e.printStackTrace(),
        () -> System.out.println("completed"));

It dodin't call onComplete. I got this.

1
2
3
1
2
3
1
2
3

However, I tried Flowable, it called onComplete.

Flowable.range(1, 3).repeatWhen(handler -> handler.take(2))
    .subscribe(
        System.out::println, 
        e -> e.printStackTrace(),
        () -> System.out.println("completed"));

The result was below.

1
2
3
1
2
3
completed

I tried on 2.0.2.

@akarnokd akarnokd added this to the 2.0 backlog milestone Dec 9, 2016
@akarnokd
Copy link
Member

akarnokd commented Dec 9, 2016

Thanks. This is a bug with Observable.repeat. I'll post a fix shortly.

@akarnokd
Copy link
Member

akarnokd commented Dec 9, 2016

See #4911.

@akarnokd
Copy link
Member

akarnokd commented Dec 9, 2016

Closing via #4911

@akarnokd akarnokd closed this as completed Dec 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants