Skip to content

Commit 1690716

Browse files
committed
chore: sync changes
1 parent d6b09bc commit 1690716

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/@livestore/common/src/sync/ClientSessionSyncProcessor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const makeClientSessionSyncProcessor = ({
9090
const eventDef = getEventDef(schema, name)
9191
const nextNumPair = EventSequenceNumber.nextPair({
9292
seqNum: baseEventSequenceNumber,
93-
isClient: eventDef.eventDef.options.clientOnly
93+
isClient: eventDef.eventDef.options.clientOnly,
9494
})
9595
baseEventSequenceNumber = nextNumPair.seqNum
9696
return new LiveStoreEvent.EncodedWithMeta(
@@ -197,7 +197,7 @@ export const makeClientSessionSyncProcessor = ({
197197

198198
// NOTE We need to lazily call `.pull` as we want the cursor to be updated
199199
yield* Stream.suspend(() =>
200-
clientSession.leaderThread.events.pull({ cursor: syncStateRef.current.upstreamHead }),
200+
clientSession.leaderThread.events.pull({ cursor: syncStateRef.current.upstreamHead }),
201201
).pipe(
202202
Stream.tap(({ payload }) =>
203203
Effect.gen(function* () {
@@ -221,7 +221,7 @@ export const makeClientSessionSyncProcessor = ({
221221
}
222222

223223
syncStateRef.current = mergeResult.newSyncState
224-
syncStateUpdateQueue.offer(mergeResult.newSyncState).pipe(Effect.runSync)
224+
yield* syncStateUpdateQueue.offer(mergeResult.newSyncState)
225225

226226
if (mergeResult._tag === 'rebase') {
227227
span.addEvent('merge:pull:rebase', {

0 commit comments

Comments
 (0)