mirror of
https://github.com/tanrax/org-social-relay
synced 2026-01-09 06:43:34 +01:00
The SSE endpoint was using pubsub.listen() which blocks indefinitely waiting for messages. This prevented heartbeats from being sent when there was no activity, causing connections to timeout and close. Changed to use pubsub.get_message(timeout=1) in a while loop, which allows heartbeats to be sent every 30 seconds even when there are no new notifications, keeping connections alive. This fixes the issue where SSE connections would break and users wouldn't receive real-time notifications.