mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-12-18 14:47:15 +00:00
hotfix
This commit is contained in:
parent
38521558a1
commit
2b7e9534f3
@ -1,8 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## 0.5.15
|
||||
## 0.5.15 HOTFIX FOR 0.5.14
|
||||
|
||||
## 0.5.14
|
||||
* `Coroutines`
|
||||
* Fixes in `subscribeAsync`
|
||||
|
||||
## 0.5.14 NOT RECOMMENDED
|
||||
|
||||
* `Versions`
|
||||
* `Kotlin`: `1.5.10` -> `1.5.20`
|
||||
|
@ -38,7 +38,7 @@ private data class AsyncSubscriptionCommandData<T, M>(
|
||||
override suspend fun invoke(markersMap: MutableMap<M, SubscribeAsyncReceiver<T>>) {
|
||||
val marker = markerFactory(data)
|
||||
markersMap.getOrPut(marker) {
|
||||
SubscribeAsyncReceiver(scope) {
|
||||
SubscribeAsyncReceiver(scope.LinkedSupervisorScope()) {
|
||||
safelyWithoutExceptions { block(it) }
|
||||
if (isEmpty()) {
|
||||
onEmpty(marker)
|
||||
@ -80,7 +80,7 @@ fun <T, M> Flow<T>.subscribeAsync(
|
||||
actor.send(dataCommand)
|
||||
}
|
||||
|
||||
job.invokeOnCompletion { subscope.cancel() }
|
||||
job.invokeOnCompletion { if (subscope.isActive) subscope.cancel() }
|
||||
|
||||
return job
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user