Skip to content

Commit

Permalink
Fix possible panic and failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndereAndi committed Mar 15, 2024
1 parent cce1ca9 commit 14e3b09
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hub/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ func (h *Hub) Shutdown() {
for _, c := range h.connections {
c.CloseConnection(false, 0, "")
}
if h.httpServer == nil {
return
}
if err := h.httpServer.Shutdown(context.Background()); err != nil {
logging.Log().Error("HTTP server shutdown:", err)
}
Expand Down

0 comments on commit 14e3b09

Please sign in to comment.