Commits

Anonymous committed a8abc3f

FIX: Died when all connections were dead.

  • Participants
  • Parent commits 727387c

Comments (0)

Files changed (1)

     def stay_connected(self):
         """Keep the network connected."""
         new_packet_num = 0
-        for i in range(num_connections):
-            self.new_connection()
-        while True in [thread.is_alive() for thread in self.connections]:
+        while True:
+            # replace dead connections
             for t in [t for t in self.connections if not t.is_alive()]:
                 #print("dead")
                 self.connections.remove(t)