Skip to content

Commit 9f22d2e

Browse files
committed
Also ensure stop when token expired
1 parent 8ff9ffc commit 9f22d2e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/powersync_core/lib/src/sync/streaming_sync.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ class StreamingSyncImplementation implements StreamingSync {
403403
if (tokenExpiresIn == 0) {
404404
// Token expired already - stop the connection immediately
405405
connector.prefetchCredentials(invalidate: true).ignore();
406+
shouldStopIteration = true;
406407
break;
407408
} else if (tokenExpiresIn <= 30) {
408409
// Token expires soon - refresh it in the background

0 commit comments

Comments
 (0)