mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-10-30 19:51:59 +01:00
The SSE endpoints registered their bridge callbacks once behind a _callbacks_registered latch. Anything that cleared the bridge's push callbacks therefore killed the stream permanently — the latch stayed True while the subscriptions were gone, so no later stream open repaired them. Cache the callback objects instead and re-register them each time a stream opens. Bridge registration is idempotent, so the repeat costs nothing while a subscription that went missing is repaired rather than leaving the stream silently dead until the daemon restarts. The clear that made this reachable is fixed in openhop_core, where the frame server now retracts only its own subscriptions instead of clearing every callback on each companion client connection. This half is the belt-and-braces: clear_push_callbacks() remains a legitimate full reset, and the stream should survive one.