Releases a client object to the pool.

        Args:
            client: Client object.
559370
def release_client(self, client):
        
        if isinstance(client, Client):
            if not self._is_expired_client(client):
                LOG.debug('Client is not expired. Adding back to pool')
                self.__pool.append(client)
            elif client.is_connected():
                LOG.debug('Client is expired and connected. Disconnecting')
                client.disconnect()
        if self.__sem is not None:
            self.__sem.release()
552035
protected void releaseConnection(Object conn)
    {
        clientFactory.releaseConnection(((Connection) conn).getPool(), ((Connection) conn).getClient());
    }
1148171
def release(self):
        
        if self.errored:
            self.pool.delete_resource(self)
        else:
            self.pool.release(self)
610672
def destroy(self):
        """"""
        while True:
            try:
                client = self.__pool.popleft()
                if isinstance(client, Client):
                    client.disconnect()
            except IndexError:
                break
669027
public void release(Object o)
    {
        synchronized(this)
        {
            usedPool.remove(o);
            freePool.add(o);
            notify();
        }
    }
381020
public void releaseClientObject (Name username)
    {
        ClientObject clobj = _objmap.get(username);
        if (clobj == null) {
            log.info("Requested to release unmapped client object", "username", username);
            return;
        }

        // decrement the reference count and stop here if there are remaining references
        if (clobj.release()) {
            return;
        }

        log.debug("Destroying client " + clobj.who() + ".");

        // we're all clear to go; remove the mapping
        _objmap.remove(username);

        // and destroy the object itself
        _omgr.destroyObject(clobj.getOid());
    }
1031766
private void disconnect(AFTPClient client) {
	try {
	    if (client != null && client.isConnected()) {
		client.quit();
		client.disconnect();
	    }
	}
	catch (IOException ioe) {}
    }
774728
def close(self):
        
        self.application.client_leaving(self)

        self.conn.close()
        self.closed = True
184293
def deleteClient(self, *args, **kwargs):
        

        return self._makeApiCall(self.funcinfo["deleteClient"], *args, **kwargs)
282602
def _remove(self, client_kwargs):
        
        with _handle_client_error():
            # Object
            if 'Key' in client_kwargs:
                return self.client.delete_object(**client_kwargs)

            # Bucket
            return self.client.delete_bucket(Bucket=client_kwargs['Bucket'])
1230551
def release(self, connection):
        ""
        # Make sure we haven't changed process.
        self._checkpid()
        if connection.pid != self.pid:
            return

        # Put the connection back into the pool.
        try:
            self.pool.put_nowait(connection)
        except Full:
            # perhaps the pool has been reset() after a fork? regardless,
            # we don't want this connection
            pass
595608
protected synchronized void dispose() {
        this.users--;
        if (this.users == 0) {
            try {
                Client currentClient = this.client.get();
                if (currentClient != null) {
                    currentClient.close();
                }
            } catch (Exception x) {
                // ignore
            }
        }
    }
1142498
def free(cls, pid, connection):
        
        with cls._lock:
            LOGGER.debug('Freeing %s from pool %s', id(connection), pid)
            cls._ensure_pool_exists(pid)
            cls._pools[pid].free(connection)
333507
public function delete(Client $client)
    {
        $client->tokens()->update(['revoked' => true]);

        $client->forceFill(['revoked' => true])->save();
    }
643092
private void closeClient(Client client) {
        logger.debug("Closing client {}", client);
        client.close();
        openClients.remove(client.targetPlayer);
        useCounts.remove(client);
        timestamps.remove(client);
    }
1350917
def delete_client(client_id, preserve_cache):
    
    if client_id in drivers:
        drivers.pop(client_id).quit()
        try:
            timers[client_id].stop()
            timers[client_id] = None
            release_semaphore(client_id)
            semaphores[client_id] = None
        except:
            pass

    if not preserve_cache:
        pth = CHROME_CACHE_PATH + g.client_id
        shutil.rmtree(pth)
1187224
protected synchronized void releaseConnectionPool(String poolName) {

    HikariDataSource pool = pools.get(poolName);

    if (pool != null) {
      logger.info("Releasing pool: {}...", pool.getPoolName());
      pool.close();
    }
  }