diff --git a/examples/chat/hub.go b/examples/chat/hub.go index 92da865..76ec3d4 100644 --- a/examples/chat/hub.go +++ b/examples/chat/hub.go @@ -43,7 +43,7 @@ func (h *Hub) run() { case conn.send <- message: default: close(conn.send) - delete(hub.connections, conn) + delete(h.connections, conn) } } }