Skip to content

Commit 5dfd36c

Browse files
committed
Mention why collection is necessary
1 parent 40ccd4c commit 5dfd36c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/powersync/lib/src/web/sync_worker.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ class _SyncRunner {
134134
sync?.abort();
135135
sync = null;
136136

137+
// The only reliable notification we get for a client closing is
138+
// when that client is currently hosting the database. Use the
139+
// opportunity to check whether secondary clients have also closed
140+
// in the meantime.
137141
final newHost = await _collectActiveClients();
138142
if (newHost == null) {
139143
_logger.info('No client remains');

0 commit comments

Comments
 (0)