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 sometimes empty response. #613

merged 1 commit into from Jan 21, 2019


None yet
2 participants
Copy link

rassmate commented Jan 14, 2019

Sometimes the response will be accidentally empty.
This seems to be due to the fact that onCompleted is sometimes called before onNext where the connection is send.

Moving the onNext event into the synchronized block fixes the problem.

Also added a test that without is flaky without my fix

Might do some good for

Jonas Fredin
Copy link

jamesgorman2 left a comment

Thanks Jonas, LGTM.

Synchronised sequencing looks right. There's probably a less blocking (and more complicated) approach like in the canonical RxJava examples but I don't think they bring enough benefit to warrant putting them in.

@jamesgorman2 jamesgorman2 merged commit ca6d0e1 into ReactiveX:0.5.x Jan 21, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment