1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-06 01:20:19 +00:00

session destroy

This commit is contained in:
astaxie
2016-01-18 16:11:27 +08:00
parent 6e987bfdaf
commit fa8f6e5a53
4 changed files with 5 additions and 71 deletions

View File

@ -650,7 +650,9 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
return
}
defer func() {
context.Input.CruSession.SessionRelease(rw)
if context.Input.CruSession != nil {
context.Input.CruSession.SessionRelease(rw)
}
}()
}