File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
packages/web/src/worker/db Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -90,8 +90,9 @@ export class SharedWASQLiteConnection implements AsyncDatabaseConnection {
9090
9191 if ( clientIds . size == 0 ) {
9292 logger . debug ( `Closing connection to ${ this . options } .` ) ;
93+ const connection = this . connection ;
9394 dbMap . delete ( dbFilename ) ;
94- return this . connection . close ( ) ;
95+ await connection . close ( ) ;
9596 }
9697 logger . debug ( `Connection to ${ dbFilename } not closed yet due to active clients.` ) ;
9798 return ;
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ export function proxyWASQLiteConnection(connection: AsyncDatabaseConnection): As
2222}
2323
2424export class WorkerWASQLiteConnection extends WASqliteConnection {
25- registerOnTableChange ( callback : OnTableChangeCallback ) : Promise < ( ) => void > {
25+ async registerOnTableChange ( callback : OnTableChangeCallback ) : Promise < ( ) => void > {
2626 // Proxy the callback remove function
27- return Comlink . proxy ( super . registerOnTableChange ( callback ) ) ;
27+ return Comlink . proxy ( await super . registerOnTableChange ( callback ) ) ;
2828 }
2929}
You can’t perform that action at this time.
0 commit comments