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

fix(delayWhen): correctly handle synchronous duration observable #2589

Merged
merged 1 commit into from
May 3, 2017

Conversation

kwonoj
Copy link
Member

@kwonoj kwonoj commented May 3, 2017

Description:
This PR fixes outersubscriber behavior of delayWhen operator, to complete it correctly when duration selector returns synchronous observable. Similar to #1490 in crux.

Related issue (if exists):

@kwonoj
Copy link
Member Author

kwonoj commented May 3, 2017

This shouldn't cause any breaking changes.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0004%) to 97.644% when pulling 9c8061d on kwonoj:fix-delaywhen-sync into 83ebe90 on ReactiveX:master.

@@ -56,7 +56,7 @@ export function delayWhen<T>(this: Observable<T>, delayDurationSelector: (value:
subscriptionDelay?: Observable<any>): Observable<T> {
if (subscriptionDelay) {
return new SubscriptionDelayObservable(this, subscriptionDelay)
.lift(new DelayWhenOperator(delayDurationSelector));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, these sorts of formatting corrections should be in a separate commit for easier review.

@@ -112,7 +112,7 @@ class DelayWhenSubscriber<T, R> extends OuterSubscriber<T, R> {
this.tryDelay(delayNotifier, value);
}
} catch (err) {
this.destination.error(err);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above.

@benlesh benlesh merged commit 695f280 into ReactiveX:master May 3, 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
@kwonoj kwonoj deleted the fix-delaywhen-sync branch October 4, 2019 05:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: delayWhen operator returns an Observable that does not complete.
3 participants