mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Use IO dispatcher for cleanup in bug reporter (#3092)
This commit is contained in:
committed by
GitHub
parent
ce28a05467
commit
40b7736fcf
@@ -0,0 +1 @@
|
|||||||
|
Make sure we don't use the main dispatcher while closing the bug report request, as it can lead to crashes in strict mode.
|
||||||
+6
-4
@@ -282,11 +282,13 @@ class DefaultBugReporter @Inject constructor(
|
|||||||
listener.onUploadFailed(serverError)
|
listener.onUploadFailed(serverError)
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
// delete the generated files when the bug report process has finished
|
withContext(coroutineDispatchers.io) {
|
||||||
for (file in bugReportFiles) {
|
// delete the generated files when the bug report process has finished
|
||||||
file.safeDelete()
|
for (file in bugReportFiles) {
|
||||||
|
file.safeDelete()
|
||||||
|
}
|
||||||
|
response?.close()
|
||||||
}
|
}
|
||||||
response?.close()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user