mirror of
https://github.com/Luzifer/mapshare.git
synced 2024-11-09 13:40:00 +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()
|
||||
|
||||
if pos.Retained {
|
||||
reqRetainerLock.Lock()
|
||||
if pos.Retained {
|
||||
reqRetainer[mapID] = pos
|
||||
reqRetainerLock.Unlock()
|
||||
} else {
|
||||
delete(reqRetainer, mapID)
|
||||
}
|
||||
reqRetainerLock.Unlock()
|
||||
|
||||
reqDistributorsLock.RLock()
|
||||
defer reqDistributorsLock.RUnlock()
|
||||
|
|
Loading…
Reference in a new issue