mirror of
https://github.com/Syncplay/syncplay
synced 2025-02-18 03:56:51 +00:00
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._rooms = {}
|
||||
self._roomStates = {}
|
||||
self._usersCheckupTimer = task.LoopingCall(self._checkUsers)
|
||||
self._usersCheckupTimer.start(4, True)
|
||||
|
||||
def buildProtocol(self, addr):
|
||||
return SyncServerProtocol(self)
|
||||
@ -188,15 +186,6 @@ class SyncFactory(Factory):
|
||||
for receiver in room:
|
||||
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):
|
||||
def broadcast(self, sender, what):
|
||||
self.broadcastRoom(sender, what)
|
||||
|
Loading…
Reference in New Issue
Block a user