Browse Source

fix for client crash

Darren Ranalli 17 years ago
parent
commit
2c71002065

+ 1 - 1
direct/src/distributed/ConnectionRepository.py

@@ -116,7 +116,7 @@ class ConnectionRepository(
             # manual garbage-collect task
             # manual garbage-collect task
             taskMgr.add(self._garbageCollect, self.GarbageCollectTaskName, 200)
             taskMgr.add(self._garbageCollect, self.GarbageCollectTaskName, 200)
             # periodically increase gc threshold if there is no garbage
             # periodically increase gc threshold if there is no garbage
-            taskMgr.doMethodLater(self.config.GetFloat('garbage-threshold-adjust-delay', 15 * 60.),
+            taskMgr.doMethodLater(self.config.GetFloat('garbage-threshold-adjust-delay', 5 * 60.),
                                   self._adjustGcThreshold, self.GarbageThresholdTaskName)
                                   self._adjustGcThreshold, self.GarbageThresholdTaskName)
             
             
         self._gcDefaultThreshold = gc.get_threshold()
         self._gcDefaultThreshold = gc.get_threshold()

+ 2 - 2
direct/src/showbase/GarbageReport.py

@@ -529,7 +529,7 @@ def checkForGarbageLeaks():
         func('%s garbage cycles found, see info above' % gr.getNumCycles())
         func('%s garbage cycles found, see info above' % gr.getNumCycles())
     return numGarbage
     return numGarbage
 
 
-def b_checkForGarbageLeaks():
+def b_checkForGarbageLeaks(wantReply=False):
     # does a garbage collect on the client and the AI
     # does a garbage collect on the client and the AI
     # returns number of client garbage leaks
     # returns number of client garbage leaks
     # logs leak info and terminates (if configured to do so)
     # logs leak info and terminates (if configured to do so)
@@ -540,5 +540,5 @@ def b_checkForGarbageLeaks():
         pass
         pass
     else:
     else:
         if base.cr.timeManager:
         if base.cr.timeManager:
-            base.cr.timeManager.d_checkForGarbageLeaks()
+            base.cr.timeManager.d_checkForGarbageLeaks(wantReply=wantReply)
     return checkForGarbageLeaks()
     return checkForGarbageLeaks()