Unneeded function removed from server
This commit is contained in:
parent
ee954cfcfa
commit
2941cd1849
@ -16,8 +16,6 @@ class SyncFactory(Factory):
|
|||||||
self.password = password
|
self.password = password
|
||||||
self._rooms = {}
|
self._rooms = {}
|
||||||
self._roomStates = {}
|
self._roomStates = {}
|
||||||
self._usersCheckupTimer = task.LoopingCall(self._checkUsers)
|
|
||||||
self._usersCheckupTimer.start(4, True)
|
|
||||||
|
|
||||||
def buildProtocol(self, addr):
|
def buildProtocol(self, addr):
|
||||||
return SyncServerProtocol(self)
|
return SyncServerProtocol(self)
|
||||||
@ -188,15 +186,6 @@ class SyncFactory(Factory):
|
|||||||
for receiver in room:
|
for receiver in room:
|
||||||
what(receiver)
|
what(receiver)
|
||||||
|
|
||||||
def _checkUsers(self):
|
|
||||||
for room in self._rooms.itervalues():
|
|
||||||
for watcher in room.itervalues():
|
|
||||||
if(time.time() - watcher.lastUpdate > constants.PROTOCOL_TIMEOUT):
|
|
||||||
watcher.watcherProtocol.drop()
|
|
||||||
self.removeWatcher(watcher.watcherProtocol)
|
|
||||||
self._checkUsers() #restart
|
|
||||||
return #end loop
|
|
||||||
|
|
||||||
class SyncIsolatedFactory(SyncFactory):
|
class SyncIsolatedFactory(SyncFactory):
|
||||||
def broadcast(self, sender, what):
|
def broadcast(self, sender, what):
|
||||||
self.broadcastRoom(sender, what)
|
self.broadcastRoom(sender, what)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user