mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
Fixed silly bug with not giving proper warnings when already listening on a port
This commit is contained in:
parent
42ac45fd53
commit
59c6d5137a
@ -2,6 +2,7 @@ import direct
|
||||
from pandac.PandaModules import HttpRequest
|
||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
from direct.task.TaskManagerGlobal import taskMgr
|
||||
from direct.task import Task
|
||||
|
||||
notify = directNotify.newCategory('WebRequestDispatcher')
|
||||
|
||||
@ -184,3 +185,17 @@ class WebRequestDispatcher(object):
|
||||
uri = "/" + uri
|
||||
self.uriToHandler.pop(uri,None)
|
||||
|
||||
|
||||
# -- Poll task wrappers
|
||||
|
||||
def pollHTTPTask(self,task):
|
||||
self.poll()
|
||||
return Task.again
|
||||
|
||||
def startCheckingIncomingHTTP(self, interval=0.3):
|
||||
taskMgr.remove('pollHTTPTask')
|
||||
taskMgr.doMethodLater(interval,self.pollHTTPTask,'pollHTTPTask')
|
||||
|
||||
def stopCheckingIncomingHTTP(self):
|
||||
taskMgr.remove('pollHTTPTask')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user