Cleanup the session in the DirectoryConnection.
977247
private void cleanupSession(){
        eventThread.queueClientEvent(new ClientSessionEvent(SessionEvent.CLOSED));
        watcherManager.cleanup();
        session.id = "";
        session.password = null;
        session.serverId = -1;
        onSessionClose();
    }
583549
def cleanup(self):
        
        if self._movie is not None:
            self._movie.frameChanged.disconnect(self._updateFrame)
            self._movie = None
1030220
def Cleanup(self):
		
		self.lock.acquire()
		try:
			for bucket in self.connections.values():
				try:
					for conn in bucket:
						conn.lock()
						try:
							open = conn.TestConnection(forceCheck=True)
							if open is True:
								conn.commit()
							else:
								#Remove the connection from the pool. Its dead better of recreating it.
								index = bucket.index(conn)
								del bucket[index]
							conn.release()
						except Exception:
							conn.release()
				except Exception:
					pass
		finally:
			self.lock.release()
1214137
private void purgeAllConnections() {
        synchronized (m_dbConns) {
            Iterator<DBConn> iter = m_dbConns.iterator();
            while (iter.hasNext()) {
                DBConn dbConn = iter.next();
                dbConn.close();
                iter.remove();
            }
        }
    }
592042
protected function cleanup()
    {
        // if $this->fs is an object, the Filesystem has been used, clean it up.
        if (is_object($this->fs)) {
            if ($this->fs->isDirectory($this->tempPath)) {
                $this->fs->deleteDirectory($this->tempPath, false);
            }
        }
    }
291657
public void cleanup ()
    {
        // tell any pending object subscribers that they're not getting their bits
        for (PendingRequest<?> req : _penders.values()) {
            for (Subscriber<?> sub : req.targets) {
                sub.requestFailed(req.oid, new ObjectAccessException("Client connection closed"));
            }
        }
        _penders.clear();
        _flusher.cancel();
        _flushes.clear();
        _dead.clear();
        _client.getRunQueue().postRunnable(new Runnable() {
            public void run () {
                _ocache.clear();
            }
        });
    }
748647
def clean(self):
        
        # Note that we do not close the connection here -- somebody
        # may still be reading from it.
        while len(self.queue) > 0 and self._pair_stale(self.queue[0]):
            self.queue.pop(0)
543137
def cleanup(self):
        
        # Closes connections to all databases to avoid the long running process
        # from holding connections indefinitely.
        for alias in db.connections.databases:
            logger.info('Closing database connection: %s', alias)
            db.connections[alias].close()
96468
private function cleanPreviousSession()
    {
        $error = new \RuntimeException('Connection has been closed.');
        foreach ($this->receivingFlows as $receivingFlow) {
            $receivingFlow->getDeferred()->reject($error);
        }
        $this->receivingFlows = [];
        foreach ($this->sendingFlows as $sendingFlow) {
            $sendingFlow->getDeferred()->reject($error);
        }
        $this->sendingFlows = [];
    }
712014
def clean(self):
        """"""
        connection = self._backend._get_connection()
        self._backend.clean(connection)
53318
def cleanup(config_dir):
    """"""
    stdout_path = os.path.join(config_dir, 'pueue.stdout')
    stderr_path = os.path.join(config_dir, 'pueue.stderr')
    if os._exists(stdout_path):
        os.remove(stdout_path)
    if os._exists(stderr_path):
        os.remove(stderr_path)

    socketPath = os.path.join(config_dir, 'pueue.sock')
    if os.path.exists(socketPath):
        os.remove(socketPath)
1007797
public static void cleanupActiveSession() {
        Session session = AbstractHandler.ACTIVE_SESSION.get();
        if (session != null) {
            try {
                AbstractHandler.ACTIVE_SESSION.remove();
                session.logout();
                LOGGER.debug("Logged out REST service session");
            } catch (Exception e) {
                LOGGER.warn(e, "Error while trying to logout REST service session");
            }
        }
    }
182661
def _cleanup(path: str) -> None:
    """"""
    if os.path.isdir(path):
        shutil.rmtree(path)
1204059
public function cleanUp()
    {
        $this->filesystem->remove($this->compressedArchivePath);
        $this->filesystem->remove($this->outputPath);
    }
41374
@Override
    final public void cleanup() throws ResourceException {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, "cleanup");
        }

        // Invalidate all of the sessions

        for (final Iterator iterator = _sessions.iterator(); iterator.hasNext();) {
            final Object object = iterator.next();
            if (object instanceof JmsJcaSessionImpl) {
                ((JmsJcaSessionImpl) object).invalidate();
            }
        }
        _sessions.clear();

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, "cleanup");
        }

    }
122719
def cleanup(self):
        """"""
        for item in self.server_map:
            self.member_del(item, reconfig=False)
        self.server_map.clear()
584724
private void cleanup() {

        m_folder1Exclusive = null;
        m_folder2Exclusive = null;
        m_foldersSibling = null;
        m_foldersEqualnames = null;
        m_foldersDifferenttypes = null;
    }