(self)
Throw away old (timed-out) pending fragments
Throw away old (timed-out) pending fragments
Throw away old ( timed - out ) pending fragments
def clean(self):
        """Throw away old (timed-out) pending fragments
        """
        # Find the timed-out messages
        timed_out = []
        t_now = time.time()
        for seq_num in self.frag_map:
            if (t_now - self.frag_map[seq_num]['t_last'] > self.timeout):
                timed_out.append(seq_num)

        # Delete the timed-out messages
        for seq_num in timed_out:
            logger.debug("BlocksatPktHandler: Delete Seq Num {} from fragment "
                         "map".format(seq_num))
            del self.frag_map[seq_num]
def clean ( self ) : # Find the timed-out messages timed_out = [ ] t_now = time . time ( ) for seq_num in self . frag_map : if ( t_now - self . frag_map [ seq_num ] [ 't_last' ] > self . timeout ) : timed_out . append ( seq_num ) # Delete the timed-out messages for seq_num in timed_out : logger . debug ( "BlocksatPktHandler: Delete Seq Num {} from fragment " "map" . format ( seq_num ) ) del self . frag_map [ seq_num ]