Files
cdk/crates
C 62f085b350 Fix missed events race when creating subscriptions (#1023)
Previously, we fetched the initial state *before* registering the new
subscription. Any events emitted after the DB read but before the
subscription was installed were dropped—most visible under
low-resource conditions (e.g., CI).

Change:
- Register the subscription first, then asynchronously fetch and send
  the initial state (spawned task). This eliminates the window where
  events could be missed.
- Require `F: Send + Sync` and store `on_new_subscription` as `Arc<F>`
  so it can be safely used from the spawned task.

Result:
- No gap between “subscribe” and “start receiving,” avoiding lost events.
- Initial state still delivered, now via a background task.
2025-09-01 20:24:50 +01:00
..
2025-08-31 23:05:24 +01:00
2025-08-18 16:25:24 +01:00
2025-07-31 00:43:43 -04:00