Skip to content

Commit e61059a

Browse files
committed
No longer awaiting when aborting connection on tab closure. Fixes some edge cases where multiple tabs with OPFS/Safari can cause deadlocks.
1 parent f9e2e9c commit e61059a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/rare-windows-argue.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@powersync/web': patch
3+
---
4+
5+
No longer awaiting when aborting connection on tab closure. Fixes some edge cases where multiple tabs with OPFS/Safari can cause deadlocks.

packages/web/src/worker/sync/SharedSyncImplementation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ export class SharedSyncImplementation extends BaseObserver<SharedSyncImplementat
487487
});
488488
lastClient.closeListeners.push(async () => {
489489
this.logger.info('Aborting open connection because associated tab closed.');
490-
await wrapped.close().catch((ex) => this.logger.warn('error closing database connection', ex));
490+
wrapped.close().catch((ex) => this.logger.warn('error closing database connection', ex));
491491
wrapped.markRemoteClosed();
492492
});
493493

0 commit comments

Comments
 (0)