Browse Source

exit faster in cleanup thread

v2ray 9 năm trước cách đây
mục cha
commit
4773a8f4ae
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      common/collect/timed_queue.go

+ 2 - 0
common/collect/timed_queue.go

@@ -90,6 +90,8 @@ func (queue *TimedQueue) cleanup(tick <-chan time.Time) {
 				queue.queue.Swap(i, queue.queue.Len()-1)
 				queue.queue.Pop()
 				changed = true
+			} else {
+				break
 			}
 		}
 		if changed {