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

1.x: fix using() resource cleanup when factory throws or being non-eager #3922

Merged
merged 1 commit into from
May 10, 2016

Conversation

akarnokd
Copy link
Member

@akarnokd akarnokd commented May 9, 2016

The operator using didn't call the resource cleanup code if the observableFactory.call() code crashed. In addition, a non-eager using didn't call the resource cleanup if one subscribed with unsafeSubscribe or the subscription to the generated Observable crashed.

Related: #3921

Exceptions.throwIfFatal(e);
Exceptions.throwIfFatal(disposeError);
if (disposeError != null) {
subscriber.onError(new CompositeException(Arrays.asList(e, disposeError)));
Copy link
Contributor

Choose a reason for hiding this comment

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

CompositeException accepts varargs right?

@akarnokd
Copy link
Member Author

Changes applied.

@stevegury
Copy link
Member

👍

@akarnokd akarnokd merged commit d43c05c into ReactiveX:1.x May 10, 2016
@akarnokd akarnokd deleted the UsingCleanupFix branch May 10, 2016 21:23
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