Skip to content

Commit

Permalink
AND-7638 fixed scope cancelling
Browse files Browse the repository at this point in the history
  • Loading branch information
kozarezvlad committed Jul 18, 2024
1 parent 10931ad commit 7d70626
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import com.tangem.operations.CommandResponse
import kotlinx.coroutines.CoroutineExceptionHandler
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.cancel
import kotlinx.coroutines.cancelChildren
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.launch
Expand Down Expand Up @@ -77,7 +77,6 @@ class BackupService(
throwable.printStackTrace(PrintWriter(sw))
val exceptionAsString: String = sw.toString()
Log.error { exceptionAsString }
throw throwable
}

private val handleErrors = sdk.config.handleErrors
Expand Down Expand Up @@ -434,7 +433,7 @@ class BackupService(

private fun onBackupCompleted() {
repo.reset()
backupScope.cancel()
backupScope.coroutineContext.cancelChildren()
}

sealed class State {
Expand Down

0 comments on commit 7d70626

Please # to comment.