Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/node/orpc/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down