We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 004561e commit 1e91b76Copy full SHA for 1e91b76
server/src/main/kotlin/suwayomi/tachidesk/manga/impl/update/Updater.kt
@@ -12,6 +12,7 @@ import kotlinx.coroutines.flow.asStateFlow
12
import kotlinx.coroutines.flow.catch
13
import kotlinx.coroutines.flow.consumeAsFlow
14
import kotlinx.coroutines.flow.launchIn
15
+import kotlinx.coroutines.flow.onCompletion
16
import kotlinx.coroutines.flow.onEach
17
import kotlinx.coroutines.flow.update
18
import kotlinx.coroutines.launch
@@ -156,6 +157,7 @@ class Updater : IUpdater {
156
157
logger.error(it) { "Error during updates (source: $source)" }
158
handleChannelUpdateFailure(source)
159
}
160
+ .onCompletion { updateChannels.remove(source) }
161
.launchIn(scope)
162
return channel
163
0 commit comments