mirror of
https://github.com/astaxie/beego.git
synced 2025-07-03 16:30:19 +00:00
fix SessionRegenerateID should release old SessionStore and release new SessionStore in router.go
This commit is contained in:
@ -529,7 +529,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
// session init
|
||||
if SessionOn {
|
||||
context.Input.CruSession = GlobalSessions.SessionStart(w, r)
|
||||
defer context.Input.CruSession.SessionRelease(w)
|
||||
defer func() {
|
||||
context.Input.CruSession.SessionRelease(w)
|
||||
}()
|
||||
}
|
||||
|
||||
if !utils.InSlice(strings.ToLower(r.Method), HTTPMETHOD) {
|
||||
|
Reference in New Issue
Block a user