-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SSE session handling #373
Conversation
- Introduced a new debug flag in the WebServer settings to enable detailed logging. - Set the default value for the debug mode to false in the configuration. - Updated validation logic to include the new debug flag for web server settings.
- Added debug logging to the SSEHandler for tracking client connections and notifications. - Logs the total number of connected clients when a new client connects, a notification is sent, or a client disconnects, contingent on the debug mode being enabled in the web server configuration.
…g logging - Added context cancellation for better cleanup of client connections. - Implemented heartbeat mechanism to keep connections alive and detect issues. - Enhanced debug logging for client connection events, including successful notifications and errors during marshaling and writing. - Updated client channel handling to prevent blocking and improve notification delivery.
- Added a singleton SSEManager to manage server-sent events (SSE) for real-time notifications. - Implemented methods for subscribing and unsubscribing notification callbacks. - Enhanced the initialization process to ensure a single event source is used and cleaned up on page unload. - Updated the component initialization to utilize the new SSEManager for handling notifications.
Caution Review failedThe pull request is closed. WalkthroughThe pull request introduces a debug configuration option for the web server across multiple files. The changes include adding a Changes
Assessment against linked issues
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This PR fixes #367 by properly managing one SSE session per client