Esempio n. 1
0
func killSession(r *http.Request, w http.ResponseWriter, s *sessions.Session) error {
	d := make(chan bool)
	kills <- &sessionAction{"session:" + s.ID, 0, nil, d}
	f := <-d
	if !f {
		return cantKill
	}
	var opts = *sessionStore.Options
	opts.MaxAge = -1
	s.Options = &opts
	// values
	for k, _ := range s.Values {
		delete(s.Values, k)
	}
	s.Save(r, w)
	return nil
}