Explorar el Código

delete then add

Darien Raymond hace 8 años
padre
commit
65c6972eb5
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      proxy/vmess/vmess.go

+ 1 - 1
proxy/vmess/vmess.go

@@ -64,8 +64,8 @@ func (v *TimedUserValidator) generateNewHashes(nowSec protocol.Timestamp, idx in
 		idHash.Sum(hashValueRemoval[:0])
 		idHash.Reset()
 
-		v.userHash[hashValue] = &indexTimePair{idx, entry.lastSec}
 		delete(v.userHash, hashValueRemoval)
+		v.userHash[hashValue] = &indexTimePair{idx, entry.lastSec}
 
 		entry.lastSec++
 		entry.lastSecRemoval++