doOnAfterDispose

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

Calls the shared action when the Disposable sent to the observer via onSubscribe is disposed. The action is called after the upstream is disposed.