1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-26 12:35:33 +00:00

cache, context, session: add lock to fix inconsistent field protection

This commit is contained in:
BurtonQin
2020-02-10 21:49:46 +08:00
parent de5650b723
commit cfdd1cd5be
3 changed files with 7 additions and 0 deletions

View File

@@ -71,7 +71,9 @@ func (input *BeegoInput) Reset(ctx *Context) {
input.CruSession = nil
input.pnames = input.pnames[:0]
input.pvalues = input.pvalues[:0]
input.dataLock.Lock()
input.data = nil
input.dataLock.Unlock()
input.RequestBody = []byte{}
}