repeatUntil

fun <T> Single<T>.repeatUntil(predicate: (T) -> Boolean): Observable<T>

When the Single signals onSuccess, re-subscribes to the Single if the predicate function returns false.

Please refer to the corresponding RxJava document.