소스 검색

make firstCheckDelay actually the delay before the first check (take a measurement before firstCheckDelay)

Darren Ranalli 18 년 전
부모
커밋
80d18524aa
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      direct/src/showbase/ContainerLeakDetector.py

+ 4 - 2
direct/src/showbase/ContainerLeakDetector.py

@@ -801,8 +801,10 @@ class ContainerLeakDetector(Job):
         self._pruneContainersJob = None
 
         if firstCheckDelay is None:
-            firstCheckDelay = 60. * (15./2)
-        self._nextCheckDelay = firstCheckDelay
+            firstCheckDelay = 60. * 15.
+        # divide by two, since the first check just takes length measurements and
+        # doesn't check for leaks
+        self._nextCheckDelay = firstCheckDelay/2.
         self._pruneTaskPeriod = config.GetFloat('leak-detector-prune-period', 60. * 30.)
 
         # main dict of id(container)->containerRef