Skip to content
Snippets Groups Projects
Unverified Commit 8209011e authored by takt's avatar takt Committed by GitHub
Browse files

fix concurrent access issue. (#237)

parent 6363f692
No related branches found
No related tags found
No related merge requests found
...@@ -36,8 +36,9 @@ func (ipc *ipCache) get(addr IP) *IP { ...@@ -36,8 +36,9 @@ func (ipc *ipCache) get(addr IP) *IP {
} }
ipc._set(addr) ipc._set(addr)
res := ipc.cache[addr]
ipc.cacheMu.Unlock() ipc.cacheMu.Unlock()
return ipc.cache[addr] return res
} }
func (ipc *ipCache) _set(addr IP) { func (ipc *ipCache) _set(addr IP) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment