I realize that I am using subscribeOn()/observeOn() on the MainThread. What are the set of options I can pass into subscribeOn()? What are the set of options I can pass into
You should call Observable.unsubscribeOn(Schedulers.io()), retrofit will unsubscribe at the end of a http-request.
In RxJavaCallAdapterFactory of retrofit-rxjava-adapter
it actions like this.
if (!subscriber.isUnsubscribed()) {
subscriber.onCompleted();
}
But when subscriber is a SafeSubscriber, it'll call unsubscribe finally.
I have this issue in my app.
Full code:
o.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.unsubscribeOn(Schedulers.io());