Skip to content

Commit 8173715

Browse files
committed
Remove completed update channel from available channels
1 parent 90850c2 commit 8173715

File tree

1 file changed

+2
-0
lines changed
  • server/src/main/kotlin/suwayomi/tachidesk/manga/impl/update

1 file changed

+2
-0
lines changed

server/src/main/kotlin/suwayomi/tachidesk/manga/impl/update/Updater.kt

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import kotlinx.coroutines.flow.asStateFlow
1212
import kotlinx.coroutines.flow.catch
1313
import kotlinx.coroutines.flow.consumeAsFlow
1414
import kotlinx.coroutines.flow.launchIn
15+
import kotlinx.coroutines.flow.onCompletion
1516
import kotlinx.coroutines.flow.onEach
1617
import kotlinx.coroutines.flow.update
1718
import kotlinx.coroutines.launch
@@ -159,6 +160,7 @@ class Updater : IUpdater {
159160
logger.error(it) { "Error during updates (source: $source)" }
160161
handleChannelUpdateFailure(source)
161162
}
163+
.onCompletion { updateChannels.remove(source) }
162164
.launchIn(scope)
163165
return channel
164166
}

0 commit comments

Comments
 (0)