mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 08:09:12 +01:00
Fix backup restore service concurrent modification crash on timeout.
This commit is contained in:
committed by
jeffrey-signal
parent
1bd5b03636
commit
15677c663b
@@ -161,7 +161,7 @@ class BackupMediaRestoreService : SafeForegroundService() {
|
||||
private fun stopDueToTimeout() {
|
||||
controllerLock.withLock {
|
||||
hasTimedOut = true
|
||||
controllers.forEach { it.closeFromTimeout() }
|
||||
controllers.clear()
|
||||
stop(context = this, fromTimeout = true)
|
||||
}
|
||||
|
||||
@@ -180,12 +180,6 @@ class BackupMediaRestoreService : SafeForegroundService() {
|
||||
val totalBytes: ByteSize
|
||||
get() = ArchiveRestoreProgress.state.totalRestoreSize
|
||||
|
||||
fun closeFromTimeout() {
|
||||
controllerLock.withLock {
|
||||
controllers.remove(this)
|
||||
}
|
||||
}
|
||||
|
||||
override fun close() {
|
||||
controllerLock.withLock {
|
||||
controllers.remove(this)
|
||||
|
||||
Reference in New Issue
Block a user