Skip to content

Commit 16e4487

Browse files
committed
Update status to disconnected when a response ends
1 parent 28cc51f commit 16e4487

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

crates/core/src/sync/streaming_sync.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,8 @@ impl StreamingSyncIteration {
563563
continue;
564564
}
565565
SyncEvent::StreamEnded => {
566+
self.status
567+
.update(|s| s.disconnect(), &mut event.instructions);
566568
break false;
567569
}
568570
SyncEvent::DidRefreshToken => {

dart/test/sync_test.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,11 @@ void _syncTests<T>({
207207
containsPair('status', containsPair('connected', true)))
208208
]);
209209
expect(invokeControl('connection', 'end'), [
210+
{
211+
'UpdateSyncStatus': {
212+
'status': containsPair('connected', false),
213+
}
214+
},
210215
{
211216
'CloseSyncStream': {'hide_disconnect': false}
212217
}

0 commit comments

Comments
 (0)