@defer.inlineCallbacks
    def perspective_connector_remove(self, cid):

        self.log.debug('Removing connector [%s]', cid)

        connector = self.getConnector(cid)
        if connector is None:
            self.log.error('Trying to remove a connector with an unknown cid: %s', cid)
            defer.returnValue(False)
        if connector['service'].running == 1:
            self.log.debug('Stopping service for connector [%s] before removing it', cid)
            connector['service'].stopService()

        # Stop the queue consumer
        self.log.debug('Stopping submit_sm_q consumer in connector [%s]', cid)
        yield self.perspective_connector_stop(cid)

        if self.delConnector(cid):
            self.log.info('Removed connector [%s]', cid)
            # Set persistance state to False (pending for persistance)
            self.persisted = False
            defer.returnValue(True)
        else:
            self.log.error('Error removing connector [%s], cid not found', cid)
            defer.returnValue(False)

        # Set persistance state to False (pending for persistance)
        self.persisted = False
        defer.returnValue(True)
This will stop and remove a connector from self.connectors
dataset/ETHPy150Open jookies/jasmin/jasmin/managers/clients.py/SMPPClientManagerPB.perspective_connector_remove