Use IO dispatcher for cleanup in bug reporter (#3092)

This commit is contained in:
Jorge Martin Espinosa
2024-06-25 11:26:18 +02:00
committed by GitHub
parent ce28a05467
commit 40b7736fcf
2 changed files with 7 additions and 4 deletions
@@ -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()
}
}