mirror of
https://github.com/gin-gonic/gin.git
synced 2026-06-06 12:08:20 +08:00
fix(context): data race
Signed-off-by: 0xff-dev <stevenshuang521@gmail.com>
This commit is contained in:
parent
5f4f964325
commit
34ff4d8311
@ -132,9 +132,8 @@ func (c *Context) Copy() *Context {
|
|||||||
cp.handlers = nil
|
cp.handlers = nil
|
||||||
cp.fullPath = c.fullPath
|
cp.fullPath = c.fullPath
|
||||||
|
|
||||||
cKeys := c.Keys
|
|
||||||
c.mu.RLock()
|
c.mu.RLock()
|
||||||
cp.Keys = maps.Clone(cKeys)
|
cp.Keys = maps.Clone(c.Keys)
|
||||||
c.mu.RUnlock()
|
c.mu.RUnlock()
|
||||||
|
|
||||||
cParams := c.Params
|
cParams := c.Params
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user