home · contact · privacy
Allow serving different protocols on different ports at the same time.
[plomrogue2-experiments] / new2 / plomrogue / game.py
index 2d71ac3e5089beec9117ad84dd20513f6d06d9bc..d90aa0b0f8a47350536244d7f3fab39ffdb01fce 100755 (executable)
@@ -94,13 +94,18 @@ class Game(GameBase):
     def run_tick(self):
         to_delete = []
         for connection_id in self.sessions:
-            if not connection_id in self.io.server.clients:
+            connection_id_found = False
+            for server in self.io.servers:
+                if connection_id in server.clients:
+                    connection_id_found = True
+                    break
+            if not connection_id_found:
                 t = self.get_thing(self.sessions[connection_id], create_unfound=False)
                 self.things.remove(t)
                 to_delete += [connection_id]
         for connection_id in to_delete:
             del self.sessions[connection_id]
-            self.changed = True 
+            self.changed = True
         for t in [t for t in self.things]:
             if t in self.things:
                 try: