Address code review feedback
Co-authored-by: blackboxprogramming <118287761+blackboxprogramming@users.noreply.github.com>
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user