We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
在upload()方法中,为什么要用Observable.just+flatmap才能成功地获取到token呢 如我写的两段用和不用的代码,结果只有使用以上组合的才能成功,直接请求的就会不断打印error.这是为什么呢,求教
upload()
Observable.just(session) .flatMap(s1 -> DataManager.getInstance().login(s1)) .retryWhen(observable -> observable.flatMap(throwable -> { System.out.println("error"); if (throwable instanceof IllegalAccessException) { return DataManager.getInstance().getSession().doOnNext(s -> { session.setSession(s); }); } return Observable.just(throwable); } ) )
............................
DataManager.getInstance().login(session) .retryWhen(observable -> observable.flatMap(throwable -> { System.out.println("error"); if (throwable instanceof IllegalAccessException) { return DataManager.getInstance().getSession().doOnNext(s -> { System.out.println("session error"); session.setSession(s); }); } return Observable.just(throwable); } ) )
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在
upload()
方法中,为什么要用Observable.just+flatmap才能成功地获取到token呢如我写的两段用和不用的代码,结果只有使用以上组合的才能成功,直接请求的就会不断打印error.这是为什么呢,求教
............................
The text was updated successfully, but these errors were encountered: