def check_alive(self, pID):
     """ Checks whether a peer has disconnected without telling us. """
     logging.debug("PeerList confirming connections to Peer {}.".format(pID))
     alive = orb.checkLiveness(pID, self.get_peer(pID), self.owner.type)
     if not alive:
         logging.debug("Confirmed {} is not alive.".format(pID))
         self.owner.unregister_peer(pID)
示例#2
0
 def check_alive(self, pID):
     """ Checks whether a peer has disconnected without telling us. """
     logging.debug(
         "PeerList confirming connections to Peer {}.".format(pID))
     alive = orb.checkLiveness(pID, self.get_peer(pID), self.owner.type)
     if not alive:
         logging.debug("Confirmed {} is not alive.".format(pID))
         self.owner.unregister_peer(pID)
 def check_all_alive(self):
     """ Checks whether any peer has disconnected without telling us. """
     logging.debug("PeerList confirming connections to all peers.")
     allPeers = self.get_peers()
     for pID in list(allPeers.keys()):
         alive = orb.checkLiveness(pID, allPeers[pID], self.owner.type)
         if not alive:
             logging.debug("Confirmed {} is not alive.".format(pID))
             self.owner.unregister_peer(pID)
示例#4
0
 def check_all_alive(self):
     """ Checks whether any peer has disconnected without telling us. """
     logging.debug("PeerList confirming connections to all peers.")
     allPeers = self.get_peers()
     for pID in list(allPeers.keys()):
         alive = orb.checkLiveness(pID, allPeers[pID], self.owner.type)
         if not alive:
             logging.debug("Confirmed {} is not alive.".format(pID))
             self.owner.unregister_peer(pID)