mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-18 14:59:11 +00:00
More accurate hash generation
This commit is contained in:
1 parent
7fe9683f28
commit
d4f3fc0c0f
2 files changed
+8
-9
No files matched your search
@@ -72,14 +72,14 @@ func (queue *TimedQueue) RemovedEntries() <-chan interface{} {
|
||||
|
||||
func (queue *TimedQueue) cleanup(tick <-chan time.Time) {
|
||||
for now := range tick {
|
||||
queue.access.RLock()
|
||||
queueLen := queue.queue.Len()
|
||||
queue.access.RUnlock()
|
||||
if queueLen == 0 {
|
||||
continue
|
||||
}
|
||||
nowSec := now.UTC().Unix()
|
||||
for {
|
||||
queue.access.RLock()
|
||||
queueLen := queue.queue.Len()
|
||||
queue.access.RUnlock()
|
||||
if queueLen == 0 {
|
||||
break
|
||||
}
|
||||
queue.access.RLock()
|
||||
entry := queue.queue[0]
|
||||
queue.access.RUnlock()
|
||||
|
||||
Reference in new issue
Block a user