mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-10-05 15:23:29 +01:00
Fix backup restore service concurrent modification crash on timeout.
This commit is contained in:
1 parent
1bd5b03636
commit
15677c663b
1 file changed
+1
-7
@@ -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