Selaa lähdekoodia

Update hub.go

Ryan Havar 9 vuotta sitten
vanhempi
commit
b5afd49817
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      examples/chat/hub.go

+ 1 - 1
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)
 				}
 			}
 		}