From 66b82e31d4f3cd22be3bbbf76ef06efaee79ab8b Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 24 Dec 2014 00:35:55 +0800 Subject: [PATCH] logging --- session/sessions.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/session/sessions.go b/session/sessions.go index 4f83a7f..7275770 100644 --- a/session/sessions.go +++ b/session/sessions.go @@ -371,9 +371,9 @@ func (sessions *wSessions) Remove(sid string) { delete(SessionWS, sid) } - cnt := 0 // count wide sessions associated with HTTP session - for _, s := range *sessions { - if s.HTTPSession.ID == s.HTTPSession.ID { + cnt := -1 // count wide sessions associated with HTTP session + for _, ses := range *sessions { + if ses.HTTPSession.ID == s.HTTPSession.ID { cnt++ } }