Skip to content

Commit ea99fb3

Browse files
fix tests
1 parent decbdcb commit ea99fb3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/powersync/lib/src/database/native/native_powersync_database.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

packages/powersync/lib/src/database/powersync_db_mixin.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)