Netflix/RxJava — pull request #197 by thegeez (2013-03-17 21:30:21+00:00)
Title: TakeWhile observables do not properly complete

See failing test case for an example.

This slipped through the tests because Observable.toObservable uses
Subscription.EMPTY, which means the onCompleted call after all three items
are produced calls the onComplete on the takeWhile observable, which already requested to be unsubscribed. The
undesired behaviour is shown with Observables that use subscriptions
(such as Subject) or inifinite Observables (which is how I ran into
this bug).

Similar bugs might exist elsewhere for other operations, because most
tests use Observable.toObservable rather than an Observable that uses
subscriptions.

The fix follows Rx.Net