doOnAfterTerminate

fun <T> Observable<T>.doOnAfterTerminate(action: () -> Unit): Observable<T>

Calls the action when the Observable signals a terminal event: onComplete or onError. The action is called after the observer is called.