Range calls given function for all sessions. It stops if the function returns false.
(f func(sid string, s *Session) bool)
| 191 | |
| 192 | // Range calls given function for all sessions. It stops if the function returns false. |
| 193 | func (ss *SessionStore) Range(f func(sid string, s *Session) bool) { |
| 194 | ss.lock.Lock() |
| 195 | for sid, s := range ss.sessCache { |
| 196 | if !f(sid, s) { |
| 197 | break |
| 198 | } |
| 199 | } |
| 200 | ss.lock.Unlock() |
| 201 | } |
| 202 | |
| 203 | // Shutdown terminates sessionStore. No need to clean up. |
| 204 | // Don't send to clustered sessions, their servers are not being shut down. |
no test coverage detected