Permanently remove durable subscription.

@see inactive() if you just want to indicate that the consumer is offline now.
@return void
494685
public function deactivate()
    {
        if ($this->active) {
            $this->inactive();
            $this->client->sendFrame(
                $this->getProtocol()
                    ->getUnsubscribeFrame(
                        $this->subscription->getDestination(),
                        $this->subscription->getSubscriptionId(),
                        true
                    )
            );
            $this->active = false;
        }
    }
411802
def deregister(self, subscriber):
        """"""
        try:
            logger.debug('Subscriber left')
            self.subscribers.remove(subscriber)
        except KeyError:
            logger.debug(
                'Error removing subscriber: ' +
                str(subscriber))
549056
protected function destroyApplication()
    {
        $this->client->resetPersistentVars();
        if (isset(\Yii::$app) && \Yii::$app->has('session', true)) {
            \Yii::$app->session->close();
        }
        // Close connections if exists
        if (isset(\Yii::$app) && \Yii::$app->has('db', true)) {
            \Yii::$app->db->close();
        }
    }
900494
public function inactive()
    {
        $layout = view()->exists('layouts.default')
            ? 'layouts.default'
            : 'layout';

        $pageTitle = 'Inactive account';

        $token = $this->activation->findTokenByEmail(session('inactive_email'));

        return view('auth.activation.inactive', compact('layout', 'pageTitle', 'token'));
    }
569910
public function deactivate()
    {
        $db = Loader::db();
        $q = 'update Blocks set bIsActive = 0 where bID = ?';
        $db->query($q, [$this->getBlockID()]);
    }
975362
def destroy
      membership = current_user.memberships.find_by(id: params[:id])
      group = membership.group

      Group::Services::Leave.new(group: group, person: current_user).call

      redirect_to group
    end
164606
def unsubscribe(self):
        """"""
        self.subscription = None
        self._user_assignment.clear()
        self.assignment.clear()
        self.subscribed_pattern = None
1350564
protected function resetSubscriptionParams() {
        foreach($this->options as $op=>$junk){
            if(preg_match("#Subscription.#",$op)){
                unset($this->options[$op]);
            }
        }
    }
980694
public void unsubscribe(final Subscription subscription) {
        for (final ArrayList<Subscription> list : SUBSCRIPTION_MAP.values()) {
            list.remove(subscription);
        }
    }
1227352
protected function cleanUp()
    {
        $this->fs->remove(dirname($this->downloadedFilePath));

        try {
            $licenseFile = array($this->projectDir.'/LICENSE');
            $upgradeFiles = glob($this->projectDir.'/UPGRADE*.md');
            $changelogFiles = glob($this->projectDir.'/CHANGELOG*.md');

            $filesToRemove = array_merge($licenseFile, $upgradeFiles, $changelogFiles);
            $this->fs->remove($filesToRemove);
        } catch (\Exception $e) {
            // don't throw an exception in case any of the Symfony-related files cannot
            // be removed, because this is just an enhancement, not something mandatory
            // for the project
        }

        return $this;
    }
1306903
public function unpersistService($serviceName)
    {
        if (isset($this->persistentServices[$serviceName])) {
            unset($this->persistentServices[$serviceName]);
        }
        if (isset($this->permanentServices[$serviceName])) {
            unset($this->permanentServices[$serviceName]);
        }
        if ($this->client && isset($this->client->persistentServices[$serviceName])) {
            unset($this->client->persistentServices[$serviceName]);
        }
    }
1222583
public void unsubscribe() {
        if (this.dispatcher != null) {
            throw new IllegalStateException(
                    "Subscriptions that belong to a dispatcher cannot respond to unsubscribe directly.");
        } else if (this.incoming == null) {
            throw new IllegalStateException("This subscription is inactive.");
        }

        if (isDraining()) { // No op while draining
            return;
        }

        this.connection.unsubscribe(this, -1);
    }
583627
public function unregister()
    {
        if ($this->prepare_hook)
        {
            Hook::unsubscribe('Wedeto.HTTP.Forms.Form.prepare', $this->prepare_hook);
            $this->prepare_hook = null;
        }

        if ($this->validate_hook)
        {
            Hook::unsubscribe('Wedeto.HTTP.Forms.Form.isValid', $this->validate_hook);
            $this->validate_hook = null;
        }
    }
665405
public function purgeCurrent()
    {
        if (!$this->valid()) {
            return;
        }

        if ($this->current()->hasUid()) {
            $uid = $this->current()->getUid();
            if (isset($this->uids[$uid])) {
                unset($this->uids[$uid]);
            }
        }

        $this->detach($this->current());

        $this->markAsDirty();
    }
459549
public function unRegisterMiddleware()
    {
        if (is_array($this->middleware()) && count($this->middleware()))
        {
            $middleware = new Middleware($this);
            return $middleware->remove();
        }
        return true;
    }
1199184
void deactivate(String clientID) {
        for (Subscription s : m_subscriptions) {
            if (s.clientId.equals(clientID)) {
                s.setActive(false);
            }
        }

        //go deep
        for (TreeNode child : m_children) {
            child.deactivate(clientID);
        }
    }
425979
public function destroy()
    {
        // empty
        $_SESSION = array();

        // clear cookies from agent
        $signature = ($this->_name) . 'Signature';
            setcookie(
        $this->_name,
                '',
                time() - 42000,
        $this->_path,
        $this->_host,
        $this->_secure,
        $this->_httponly
            );
            setcookie(
        $signature,
                '',
                time() - 42000,
        $this->_path,
        $this->_host,
        $this->_secure,
        $this->_httponly
            );

        /**
         * Clear out of global scope, since setcookie requires buffer flush
         * to update global <_COOKIE> array.
         */
            unset($_COOKIE[$this->_name]);
            unset($_COOKIE[$signature]);

        // destroy
            session_destroy();
    }