Skip to content

Commit

Permalink
Use IO dispatcher for cleanup in bug reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartinesp committed Jun 25, 2024
1 parent ec06ce4 commit d469cb6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog.d/3086.bugfix
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

Expand Down

0 comments on commit d469cb6

Please sign in to comment.