'Unregister a service.'

def unregisterService(self, info):

    try:
        del self.services[info.name.lower()]
        if (self.servicetypes[info.type] > 1):
            self.servicetypes[info.type] -= 1
        else:
            del self.servicetypes[info.type]
    except:
        pass
    now = currentTimeMillis()
    nextTime = now
    i = 0
    while (i < 3):
        if (now < nextTime):
            self.wait((nextTime - now))
            now = currentTimeMillis()
            continue
        out = DNSOutgoing((_FLAGS_QR_RESPONSE | _FLAGS_AA))
        out.addAnswerAtTime(DNSPointer(info.type, _TYPE_PTR, _CLASS_IN, 0, info.name), 0)
        out.addAnswerAtTime(DNSService(info.name, _TYPE_SRV, _CLASS_IN, 0, info.priority, info.weight, info.port, info.name), 0)
        out.addAnswerAtTime(DNSText(info.name, _TYPE_TXT, _CLASS_IN, 0, info.text), 0)
        if info.address:
            out.addAnswerAtTime(DNSAddress(info.server, info.ip_type, _CLASS_IN, 0, info.address), 0)
        self.send(out)
        i += 1
        nextTime += _UNREGISTER_TIME
