Skip to content

Commit 8144e0d

Browse files
Cancel monitor scope on shutdown (#504)
cancel the SpecUpdater monitorScope during shutdown so periodic monitoring stops when shutting down
1 parent 93870cf commit 8144e0d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/kotlin/com/statsig/sdk/SpecUpdater.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ internal class SpecUpdater(
4646
fun shutdown() {
4747
this.backgroundDownloadConfigs?.cancel()
4848
this.backgroundDownloadIDLists?.cancel()
49+
this.monitorScope.cancel()
4950
}
5051

5152
fun registerConfigSpecListener(callback: suspend (config: APIDownloadedConfigs, source: DataSource) -> Unit) {

0 commit comments

Comments
 (0)