瀏覽代碼

fix bug causing server to stop listening

David Rose 16 年之前
父節點
當前提交
29c61ac510
共有 1 個文件被更改,包括 4 次插入5 次删除
  1. 4 5
      direct/src/distributed/ServerRepository.py

+ 4 - 5
direct/src/distributed/ServerRepository.py

@@ -1,7 +1,6 @@
 """ServerRepository module: contains the ServerRepository class"""
 
 from pandac.PandaModules import *
-#from TaskManagerGlobal import *
 from direct.distributed.MsgTypesCMU import *
 from direct.task import Task
 from direct.directnotify import DirectNotifyGlobal
@@ -264,7 +263,7 @@ class ServerRepository:
             retVal = self.qcl.getNewConnection(rendezvous, netAddress,
                                                newConnection)
             if not retVal:
-                return
+                return task.cont
 
             # Crazy dereferencing
             newConnection=newConnection.p()
@@ -284,13 +283,13 @@ class ServerRepository:
             self.lastConnection = newConnection
             self.sendDoIdRange(client)
             
-        return Task.cont
+        return task.cont
 
     def readerPollUntilEmpty(self, task):
         """ continuously polls for new messages on the server """
         while self.readerPollOnce():
             pass
-        return Task.cont
+        return task.cont
 
     def readerPollOnce(self):
         """ checks for available messages to the server """
@@ -652,7 +651,7 @@ class ServerRepository:
         for client in self.clientsByConnection.values():
             if not self.qcr.isConnectionOk(client.connection):
                 self.handleClientDisconnect(client)
-        return Task.cont
+        return task.cont
 
     def sendToZoneExcept(self, zoneId, datagram, exceptionList):
         """sends a message to everyone who has interest in the