Commit
Refactor SSE handling in share-events and update API for direct connections
Commit details
Commit notes
- Modified the `subscribeToShareEvents` function to improve event yielding and added cleanup logic for subscriber disconnection. - Introduced `getSSEBaseUrl` function to provide a dedicated backend URL for Server-Sent Events (SSE), ensuring reliable connections by bypassing frontend proxies. - Updated hooks `useLibrarySSE` and `useShareSSE` to utilize the new SSE URL for improved performance and stability in event streaming.
These changes enhance the robustness of SSE connections and streamline event handling in the application.
- Files changed
- 4
- Lines added
- +42
- Lines removed
- −16