From 46e534382930f44f2f3ab313c0328f2e600ba146 Mon Sep 17 00:00:00 2001 From: Heikki Uljas Date: Thu, 14 Jan 2016 14:55:49 +0200 Subject: [PATCH] Always call the connect handler before any message handler. --- melody.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/melody.go b/melody.go index 0b636c5..040a1e3 100644 --- a/melody.go +++ b/melody.go @@ -88,7 +88,7 @@ func (m *Melody) HandleRequest(w http.ResponseWriter, r *http.Request) { m.hub.register <- session - go m.connectHandler(session) + m.connectHandler(session) go session.writePump()