@powersync/web 0.0.0-dev-20251030065540 → 0.0.0-dev-20251030152724
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.umd.js +4 -7
- package/dist/index.umd.js.map +1 -1
- package/dist/worker/SharedSyncImplementation.umd.js +4 -7
- package/dist/worker/SharedSyncImplementation.umd.js.map +1 -1
- package/lib/src/worker/sync/SharedSyncImplementation.d.ts +2 -2
- package/lib/src/worker/sync/SharedSyncImplementation.js +4 -7
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1786,14 +1786,11 @@ class SharedSyncImplementation extends _powersync_common__WEBPACK_IMPORTED_MODUL
|
|
|
1786
1786
|
return () => { };
|
|
1787
1787
|
}
|
|
1788
1788
|
for (const closeListener of trackedPort.closeListeners) {
|
|
1789
|
-
|
|
1789
|
+
closeListener();
|
|
1790
1790
|
}
|
|
1791
1791
|
if (this.dbAdapter && this.dbAdapter == trackedPort.db) {
|
|
1792
1792
|
// Unconditionally close the connection because the database it's writing to has just been closed.
|
|
1793
|
-
|
|
1794
|
-
await this.connectionManager
|
|
1795
|
-
.disconnect()
|
|
1796
|
-
.catch((ex) => this.logger.warn('Error while disconnecting. Will attempt to reconnect.', ex));
|
|
1793
|
+
await this.connectionManager.disconnect();
|
|
1797
1794
|
// Clearing the adapter will result in a new one being opened in connect
|
|
1798
1795
|
this.dbAdapter = null;
|
|
1799
1796
|
if (shouldReconnect) {
|
|
@@ -1922,9 +1919,9 @@ class SharedSyncImplementation extends _powersync_common__WEBPACK_IMPORTED_MODUL
|
|
|
1922
1919
|
// that and ensure pending requests are aborted when the tab is closed.
|
|
1923
1920
|
remoteCanCloseUnexpectedly: true
|
|
1924
1921
|
});
|
|
1925
|
-
lastClient.closeListeners.push(
|
|
1922
|
+
lastClient.closeListeners.push(() => {
|
|
1926
1923
|
this.logger.info('Aborting open connection because associated tab closed.');
|
|
1927
|
-
|
|
1924
|
+
wrapped.close();
|
|
1928
1925
|
wrapped.markRemoteClosed();
|
|
1929
1926
|
});
|
|
1930
1927
|
return wrapped;
|