Explorar o código

increase delete buffer size in userset

V2Ray %!s(int64=10) %!d(string=hai) anos
pai
achega
1978b98812
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      userset.go

+ 1 - 1
userset.go

@@ -42,7 +42,7 @@ func (us *TimedUserSet) updateUserHash(tick <-chan time.Time) {
 	now := time.Now().UTC()
 	lastSec := now.Unix() - cacheDurationSec
 
-	hash2Remove := make(chan hashEntry, cacheDurationSec*2*len(us.validUserIds))
+	hash2Remove := make(chan hashEntry, cacheDurationSec*3*len(us.validUserIds))
 	lastSec2Remove := now.Unix()
 	for {
 		now := <-tick