Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
Add defer to properly RUnlock context
Browse files Browse the repository at this point in the history
  • Loading branch information
achiku committed Dec 8, 2015
1 parent cae5a09 commit 1f71dba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion context.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (c *Context) Exists(key string) bool {
func (c *Context) copy() *Context {
nc := NewContext()
c.mu.RLock()
c.mu.RUnlock()
defer c.mu.RUnlock()
for k, v := range c.m {
nc.m[k] = v
}
Expand Down

0 comments on commit 1f71dba

Please sign in to comment.