```object Main { val items = Observable.just(...
# rx
l
Copy code
object Main {

    val items = Observable.just("a")
    val test = items
            .repeatWhen { it.concatMap { Observable.timer(1, TimeUnit.SECONDS) } }
    val exec = CompositeDisposable()

    @JvmStatic
    fun main(args: Array<String>) {

        exec.add(test
                .subscribe {
                    print(it)
                })
        Thread.sleep(5000)
        exec.dispose()
        exec.add(test
                .subscribe {
                    print(it)
                })
        Thread.sleep(5000)

    }
}
Why after disposing the first time, it only subscribe once? The first time prints fine five times
a
but after the dispose it runs only once
forget, it’s because I’m using
dispose
instead of
clear