wrap unsub in pageholder in try

fixing another android 11 crash
This commit is contained in:
Jay 2020-08-09 17:33:07 -04:00
parent e3e18ea775
commit 06ee5439d1

View File

@ -288,7 +288,9 @@ class PagerPageHolder(
} }
// Keep the Rx stream alive to close the input stream only when unsubscribed // Keep the Rx stream alive to close the input stream only when unsubscribed
.flatMap { Observable.never<Unit>() } .flatMap { Observable.never<Unit>() }
.doOnUnsubscribe { openStream?.close() } .doOnUnsubscribe {
try { openStream?.close() } catch (e: Exception) {}
}
.subscribe({}, {}) .subscribe({}, {})
} }