Address code review feedback

Co-authored-by: blackboxprogramming <118287761+blackboxprogramming@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-11-24 18:07:56 +00:00
parent c11f7bf9db
commit 82a39701e6
2 changed files with 2 additions and 0 deletions

View File

@@ -59,6 +59,7 @@ func main() {
if err := app.Shutdown(); err != nil { if err := app.Shutdown(); err != nil {
log.Printf("error during shutdown: %v", err) log.Printf("error during shutdown: %v", err)
} }
os.Exit(0)
}() }()
if err := app.Listen(addr); err != nil { if err := app.Listen(addr); err != nil {

View File

@@ -59,6 +59,7 @@ func (h *StreamHub) shutdown() {
for client := range h.clients { for client := range h.clients {
close(client) close(client)
} }
h.clients = make(map[chan model.Ping]struct{})
} }
// Broadcast sends message to all subscribers. // Broadcast sends message to all subscribers.