Use IO dispatcher for cleanup in bug reporter (#3092)
This commit is contained in:
committed by
GitHub
parent
924d78f3c7
commit
6def355b6e
1
changelog.d/3086.bugfix
Normal file
1
changelog.d/3086.bugfix
Normal file
@@ -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.
|
||||
@@ -282,11 +282,13 @@ class DefaultBugReporter @Inject constructor(
|
||||
listener.onUploadFailed(serverError)
|
||||
}
|
||||
} finally {
|
||||
// delete the generated files when the bug report process has finished
|
||||
for (file in bugReportFiles) {
|
||||
file.safeDelete()
|
||||
withContext(coroutineDispatchers.io) {
|
||||
// delete the generated files when the bug report process has finished
|
||||
for (file in bugReportFiles) {
|
||||
file.safeDelete()
|
||||
}
|
||||
response?.close()
|
||||
}
|
||||
response?.close()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user