def terminate(self, reason):
    log.debug('llcp link termination caused by {0}'.format(reason))
    if (reason == 'local choice'):
        self.exchange(Disconnect(0, 0), timeout=0.1)
        self.mac.deactivate()
    elif (reason == 'remote choice'):
        self.mac.deactivate()
    for i in range(63, (- 1), (- 1)):
        if (not (self.sap[i] is None)):
            log.debug(('closing service access point %d' % i))
            self.sap[i].shutdown()
            self.sap[i] = None
def terminate(self, reason):
    log.debug('llcp link termination caused by {0}'.format(reason))
    if (reason == 'local choice'):
        self.exchange(Disconnect(0, 0), timeout=0.1)
        self.mac.deactivate()
    elif (reason == 'remote choice'):
        self.mac.deactivate()
    for i in range(63, (- 1), (- 1)):
        if (not (self.sap[i] is None)):
            log.debug(('closing service access point %d' % i))
            self.sap[i].shutdown()
            self.sap[i] = None