mirror of
https://github.com/dpup/meshstream.git
synced 2026-03-28 17:42:37 +01:00
Add atomic shutdown flag and shutdown channel to handle graceful termination of Server-Sent Events connections. This ensures: 1. New connections are rejected with a proper status code during shutdown 2. Existing connections receive a notification before being closed 3. All subscriber channels are properly unsubscribed from the broker This implementation safely handles multiple in-flight requests during shutdown by using an atomic flag to track server state. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>