File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
packages/powersync/lib/src/database Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -134,8 +134,7 @@ class PowerSyncDatabaseImpl
134134
135135 // Disconnect if connected
136136 await disconnect ();
137- final _disconnecter = AbortController ();
138- disconnecter = _disconnecter;
137+ disconnecter = AbortController ();
139138
140139 await isInitialized;
141140 final dbref = database.isolateConnectionFactory ();
@@ -162,7 +161,7 @@ class PowerSyncDatabaseImpl
162161 updateSubscription = throttled.listen ((event) {
163162 port.send (['update' ]);
164163 });
165- _disconnecter .onAbort.then ((_) {
164+ disconnecter ? .onAbort.then ((_) {
166165 port.send (['close' ]);
167166 }).ignore ();
168167 } else if (action == 'uploadCrud' ) {
@@ -215,7 +214,7 @@ class PowerSyncDatabaseImpl
215214 disconnected ();
216215 });
217216
218- if (_disconnecter ? .aborted == true ) {
217+ if (disconnecter ? .aborted == true ) {
219218 disconnected ();
220219 return ;
221220 }
Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ mixin PowerSyncDatabaseMixin implements SqliteConnection {
136136 /// Abstract connection method to be implemented by platform specific
137137 /// classes. This is wrapped inside an exclusive mutex in the [connect]
138138 /// method.
139+ @protected
139140 Future <void > baseConnect (
140141 {required PowerSyncBackendConnector connector,
141142
You can’t perform that action at this time.
0 commit comments