Skip to content

Commit 1e91b76

Browse files
committed
Remove completed update channel from available channels
1 parent 004561e commit 1e91b76

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
@@ -156,6 +157,7 @@ class Updater : IUpdater {
156157
logger.error(it) { "Error during updates (source: $source)" }
157158
handleChannelUpdateFailure(source)
158159
}
160+
.onCompletion { updateChannels.remove(source) }
159161
.launchIn(scope)
160162
return channel
161163
}

0 commit comments

Comments
 (0)