def teardown_transport(self):
    log.msg(('XMPPTransport %s stopped.' % self.transport_name))
    ping_call = getattr(self, 'ping_call', None)
    if (ping_call and ping_call.running):
        ping_call.stop()
    presence_call = getattr(self, 'presence_call', None)
    if (presence_call and presence_call.running):
        presence_call.stop()
def teardown_transport(self):
    log.msg(('XMPPTransport %s stopped.' % self.transport_name))
    ping_call = getattr(self, 'ping_call', None)
    if (ping_call and ping_call.running):
        ping_call.stop()
    presence_call = getattr(self, 'presence_call', None)
    if (presence_call and presence_call.running):
        presence_call.stop()