Skip to content

Commit

Permalink
Fix web disconnect tests
Browse files Browse the repository at this point in the history
  • Loading branch information
simolus3 committed Feb 18, 2025
1 parent fc65039 commit fe88057
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/powersync_core/lib/src/streaming_sync.dart
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,11 @@ class StreamingSyncImplementation implements StreamingSync {
: (downloadError ?? lastStatus.downloadError),
statusInPriority: statusInPriority ?? lastStatus.statusInPriority,
);
lastStatus = newStatus;
_statusStreamController.add(newStatus);

if (!_statusStreamController.isClosed) {
lastStatus = newStatus;
_statusStreamController.add(newStatus);
}
}

Future<(List<BucketRequest>, Map<String, BucketDescription?>)>
Expand Down

0 comments on commit fe88057

Please sign in to comment.