Skip to content

Fix hangs in web and slow cleanups#304

Open
pschrammel wants to merge 1 commit into
IO-Design-Team:mainfrom
pschrammel:pschrammel_fixing-race_20260602
Open

Fix hangs in web and slow cleanups#304
pschrammel wants to merge 1 commit into
IO-Design-Team:mainfrom
pschrammel:pschrammel_fixing-race_20260602

Conversation

@pschrammel

Copy link
Copy Markdown

Fixes race condition causing hangs in web and slow cleanups.

if (!db.objectStoreNames.contains(objectStoreName)) {
db.close();
await Future.delayed(const Duration(milliseconds: 50));
await indexedDB!.deleteDatabase(databaseName).asFuture();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like an exceedingly dangerous operation to perform in an existence check

@Rexios80

Copy link
Copy Markdown
Member

For me to look at this properly, you will need to make unit tests that reproduce the behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants