forked from iarv/meshstream
9c438713de
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>