From 1978b988122e4626fcc1e0ad4b6fa2567d74d958 Mon Sep 17 00:00:00 2001 From: V2Ray Date: Tue, 15 Sep 2015 13:00:42 +0200 Subject: [PATCH] increase delete buffer size in userset --- userset.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userset.go b/userset.go index dafb8720..3e256277 100644 --- a/userset.go +++ b/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