Close all multiplexed connections
182501
public static function closeMuxConnections()
    {
        $count = count(self::$multiplexedConnections);
        if ($count) {
            echo "Closing $count multiplexed connections...\n";
            foreach (self::$multiplexedConnections as $key => $connection) {
                exec("ssh -O stop -o LogLevel=QUIET -S $connection > /dev/null 2>&1");
                unset(self::$multiplexedConnections[$key]);
            }
        }
    }
131588
def disconnect(self):
        
        all_conns = chain(
            self._available_connections.values(),
            self._in_use_connections.values(),
        )

        for node_connections in all_conns:
            for connection in node_connections:
                connection.disconnect()
796659
def close(self):
        
        if not self._closed:
            self._closed = True
            self._stop_multi_pools()
            if self._http_pool is not None:
                self._http_pool.clear()
                self._http_pool = None
            if self._tcp_pool is not None:
                self._tcp_pool.clear()
                self._tcp_pool = None
460132
public function close()
    {
        foreach ($this->connections as $conn) {
            $conn->close();
        }

        $this->using = false;
        $this->watching = array();
        $this->ignoring = array();
    }
1008511
def close_connection(self, connection, force=False):
        """"""
        if force:
            try:
                connection.close()
            except self.operational_exceptions:
                self.config.logger.error('ConnectionFactory - failed closing')
            for name, conn in self.pool.iteritems():
                if conn is connection:
                    break
            del self.pool[name]
        else:
            pass
205314
def close_all():
    """"""
    for key, p in _ALL_PLOTTERS.items():
        p.close()
    _ALL_PLOTTERS.clear()
    return True
527538
def close(self):
    """"""
    try:
      self._conn.send((self._CLOSE, None))
      self._conn.close()
    except IOError:
      # The connection was already closed.
      pass
    self._process.join()
1221320
function () {
    if (!self.connections.length) {
      self.removeListener('remove', remove);
      self.closing = false;
      return callback();
    }
  }
4546
void stopAll() {

		try {
			this.dmClient.closeConnection();
			stop();

		} catch( Throwable t ) {
			this.logger.warning( "An error occurred while closing the connection of the DM client." );
			Utils.logException( this.logger, new RuntimeException( t ));
		}
	}
1332489
def close(self):
        
        if not self.active:
            return
        self.active = False
        self.packetizer.close()
        self.join()
        for chan in self._channels.values():
            chan._unlink()
533655
private boolean closeAll(Context context)
   {
      boolean unclosed = false;
      CloseConnectionSynchronization ccs = getCloseConnectionSynchronization(true);

      for (org.ironjacamar.core.connectionmanager.ConnectionManager cm : context.getConnectionManagers())
      {
         for (org.ironjacamar.core.connectionmanager.listener.ConnectionListener cl :
                 context.getConnectionListeners(cm))
         {
            for (Object c : context.getConnections(cl))
            {
               if (ccs == null)
               {
                  unclosed = true;

                  if (Tracer.isEnabled())
                  {
                     Tracer.closeCCMConnection(cl.getManagedConnectionPool().getPool()
                                               .getConfiguration().getId(),
                                               cl.getManagedConnectionPool(),
                                               cl, c, context.toString());
                  }

                  closeConnection(c);
               }
               else
               {
                  ccs.add(c);
               }
            }
         }
      }

      return unclosed;
   }
853125
def close(self):
        
        if not self.closable:
            LOGGER.warning('Closed called while %s', self.state_description)
            raise ConnectionStateError(self.state_description)
        self.state = self.STATE_CLOSING
        LOGGER.info('Closing RabbitMQ connection')
        self.connection.close()
7935
private void discardIdleConnections() {
        List<Connection<CL>> connections = Lists.newArrayList();
        availableConnections.drainTo(connections);
        activeCount.addAndGet(-connections.size());

        for (Connection<CL> connection : connections) {
            try {
                closedConnections.incrementAndGet();
                connection.close(); // This is usually an async operation
            }
            catch (Throwable t) {
                // TODO
            }
        }
    }
944003
def shutdown(self):
        
        with self._lock:
            for cid in list(self.connections.keys()):
                if self.connections[cid].executing:
                    raise ConnectionBusyError(cid)
                if self.connections[cid].locked:
                    self.connections[cid].free()
                self.connections[cid].close()
                del self.connections[cid]
515325
def close(self):
        
        for pool in self.__pool.values():
            while not pool.empty():
                conn = pool.get_nowait()
                try:
                    self._close(conn)
                except Exception:
                    pass

        # reset the pool size after closing all connections
        self.__poolSize.clear()
1093703
def close(self):
        """"""
        # Instead of actually closing the connection,
        # unshare it and/or return it to the pool.
        if self._con:
            self._pool.unshare(self._shared_con)
            self._shared_con = self._con = None
25756
def close(self):
        '''
        '''
        for connection in self.ready:
            connection.close()

        for connection in self.busy:
            connection.close()

        self._closed = True