

def heartbeat_reply(self, stats):
    if self.shut_down:
        return
    if (not self.online):
        return
    if (stats == None):
        self.active_sessions = None
        self.go_offline()
    else:
        sessions_created = active_sessions = active_streams = preceived = ptransmitted = 0
        for line in stats.splitlines():
            line_parts = line.split(':', 1)
            if (line_parts[0] == 'sessions created'):
                sessions_created = int(line_parts[1])
            elif (line_parts[0] == 'active sessions'):
                active_sessions = int(line_parts[1])
            elif (line_parts[0] == 'active streams'):
                active_streams = int(line_parts[1])
            elif (line_parts[0] == 'packets received'):
                preceived = int(ptransmitted[1])
            elif (line_parts[0] == 'packets transmitted'):
                ptransmitted = int(line_parts[1])
            self.update_active(active_sessions, sessions_created, active_streams, preceived, ptransmitted)
    Timeout(self.heartbeat, randomize(self.hrtb_ival, 0.1))

dataset/ETHPy150Open sippy/b2bua/sippy/Rtp_proxy_client.py Rtp_proxy_client.heartbeat_reply/VarMisuse@180/253 `line_parts`->`ptransmitted`