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

Ensure StringObservable.from() does not perform unnecessary read #1288

Merged
merged 1 commit into from
May 30, 2014
Merged

Ensure StringObservable.from() does not perform unnecessary read #1288

merged 1 commit into from
May 30, 2014

Conversation

davidmoten
Copy link
Collaborator

An extra check is useful to check for unsubscription because as is even StringObservable.from(InputStream).first() performs two reads and the second read may block.

Added another check just before the InputStream.read() and simplified the initialization of n.

@cloudbees-pull-request-builder

RxJava-pull-requests #1189 SUCCESS
This pull request looks good

benjchristensen added a commit that referenced this pull request May 30, 2014
Ensure StringObservable.from() does not perform unnecessary read
@benjchristensen benjchristensen merged commit 73ed329 into ReactiveX:master May 30, 2014
@benjchristensen benjchristensen mentioned this pull request Jun 1, 2014
@davidmoten davidmoten deleted the string-from-bytes branch August 18, 2014 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants