mirror of
https://github.com/Luzifer/mapshare.git
synced 2024-12-20 14:41:19 +00:00
Mind latest retain value: Clear retained value
This commit is contained in:
parent
bfcffc983d
commit
fac248d94b
1 changed files with 4 additions and 2 deletions
|
@ -103,11 +103,13 @@ func handleMapSubmit(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
pos.Time = time.Now()
|
pos.Time = time.Now()
|
||||||
|
|
||||||
|
reqRetainerLock.Lock()
|
||||||
if pos.Retained {
|
if pos.Retained {
|
||||||
reqRetainerLock.Lock()
|
|
||||||
reqRetainer[mapID] = pos
|
reqRetainer[mapID] = pos
|
||||||
reqRetainerLock.Unlock()
|
} else {
|
||||||
|
delete(reqRetainer, mapID)
|
||||||
}
|
}
|
||||||
|
reqRetainerLock.Unlock()
|
||||||
|
|
||||||
reqDistributorsLock.RLock()
|
reqDistributorsLock.RLock()
|
||||||
defer reqDistributorsLock.RUnlock()
|
defer reqDistributorsLock.RUnlock()
|
||||||
|
|
Loading…
Reference in a new issue