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