diff --git a/src/node/orpc/router.ts b/src/node/orpc/router.ts index 3d2e1178a..46b25ad99 100644 --- a/src/node/orpc/router.ts +++ b/src/node/orpc/router.ts @@ -370,16 +370,11 @@ export const router = (authToken?: string) => { push(message); }); - // 2. Replay history + // 2. Replay history (sends caught-up at the end) await session.replayHistory(({ message }) => { push(message); }); - // 3. Signal that subscription is established and history replay is complete - // This allows clients to know when they can safely send messages without - // missing events due to async generator setup timing - push({ type: "caught-up" }); - try { yield* iterate(); } finally {