Dissociates this session from its current managed connection.
325016
void dissociate() {

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

        _managedConnection = null;

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

    }
67631
public void free()
    {
        if ((m_mapChildHolders != null) && (m_mapChildHolders.size() > 0))
        {
            Utility.getLogger().info("Not all sub-sessions freed by client - I will free them");
            synchronized (this)
            {
                Object[] keys = m_mapChildHolders.keySet().toArray(); // Since these are removed on free
                for (Object strID : keys)
                {
                    BaseHolder baseHolder = (BaseHolder)m_mapChildHolders.get(strID);
                    baseHolder.free();  // Should be removed from collection.
                }
                m_mapChildHolders.clear();
            }
        }
        m_mapChildHolders = null;
        if (m_parentHolder != null)
            m_parentHolder.remove(this);
        m_parentHolder = null;
        m_remoteObject = null;
    }
424941
public function disconnect()
	{
		// Close the connection.
		if (is_resource($this->connection))
		{
			pg_close($this->connection);
		}

		$this->connection = null;
	}
1085289
void dropRemoteConnections()
    {
        final String methodName = "dropRemoteConnections";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.entry(this, TRACE, methodName);
        }

        if (_connectedRemotely)
        {
            closeConnections();
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.exit(TRACE, methodName);
        }
    }
1200118
def _clean_dead_sessions(self):
        
        for sck in list(self.sessions.keys()):
            session = self.sessions[sck]
            if session.socket is None:
                del self.sessions[sck]
1257093
public void free()
    {
        if (m_record != null)
            if ((m_record.getOwner() == null) || (m_record.getOwner() == this))
                m_record.free();    // This will release the remote session (if there is one).
        m_record = null;
    }
1048019
private void onCleanup(Object connection)
    {
        // if not running within transaction boundary
        if (this.connection != null)
        {
            if (settings != null)
            {
                ((Jedis) connection).configResetStat();
            }
            factory.releaseConnection((Jedis) this.connection);
        }

        this.connection = null;
    }
316369
void connectionCloses(final Session connection) {
        synchronized (connections) {
            final ExecutorService executorService = connectionThreads.get(connection);
            if (executorService != null) {
                executorService.shutdownNow();
            }
            connectionThreads.remove(connection);
            connections.remove(connection);
        }
    }
1028528
public void disconnect() {
        Presence unavailablePresence = null;
        if (isAuthenticated()) {
            unavailablePresence = new Presence(Presence.Type.unavailable);
        }
        try {
            disconnect(unavailablePresence);
        }
        catch (NotConnectedException e) {
            LOGGER.log(Level.FINEST, "Connection is already disconnected", e);
        }
    }
683654
private void close(ManagedConnection mc)
   {
      log.debugf("Closing managed connection for recovery (%s)", mc);

      if (mc != null)
      {
         try
         {
            mc.cleanup();
         }
         catch (ResourceException ire)
         {
            log.debugf("Error during recovery cleanup", ire);
         }
      }

      if (mc != null)
      {
         try
         {
            mc.destroy();
         }
         catch (ResourceException ire)
         {
            log.debugf("Error during recovery destroy", ire);
         }
      }

      // The managed connection for recovery is now gone
      recoverMC = null;
   }
390981
@Override
	public final void onSessionClosed(Session session) {
		this.hsClient.getConnector().removeSession(session);
		HandlerSocketSession hSession = (HandlerSocketSession) session;

		hSession.destroy();
		if (this.hsClient.getConnector().isStarted()
				&& hSession.isAllowReconnect()) {
			this.reconnect(session);
		}
		for (HSClientStateListener listener : this.hsClient
				.getHSClientStateListeners()) {
			listener.onDisconnected(this.hsClient, session
					.getRemoteSocketAddress());
		}
	}
1315983
async def detach(self, discard=True):
        '''
        '''
        if discard:
            return self.close(True)
        else:
            self.connection._exit_ = False
            return self
15950
protected void _disconnect() {
    IoSession currentSession = this.session;
    this.session = null;
    this.sentHandshake = null;
    this.receivedHandshake = null;
    this.attributeAliasValues.clear();
    this.originAliasValues.clear();

    if (currentSession != null && !currentSession.isClosing()) {

      log.info(
          "Closing connection to World Model (client) at {} (waiting {}ms).",
          currentSession.getRemoteAddress(),
          Long.valueOf(this.connectionTimeout));
      while (!currentSession.close(false).awaitUninterruptibly(
          this.connectionTimeout)) {
        log.error("Connection didn't close after {}ms.",
            Long.valueOf(this.connectionTimeout));
      }
    }

    if (currentSession != null) {
      for (ConnectionListener listener : this.connectionListeners) {
        listener.connectionInterrupted(this);
      }
    }
  }
985536
@Override
    final public void dissociateConnections() throws ResourceException {

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

        // Dissociate sessions

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

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

    }
312143
def deactivate(self, address):
        
        with self.lock:
            try:
                connections = self.connections[address]
            except KeyError: # already removed from the connection pool
                return
            for conn in list(connections):
                if not conn.in_use:
                    connections.remove(conn)
                    try:
                        conn.close()
                    except IOError:
                        pass
            if not connections:
                self.remove(address)
701724
function(connection) {
      var t = this;
      log.info('removeConnection', 'Conn_' + connection.id);
      connection.disconnect('connection_removed');
      t.connections.remove(connection);
      t.trigger('connection:remove', connection);
    }
806751
public void disconnect() throws Exception {
		if (session != null) {
			session.getCloseFuture().awaitUninterruptibly();
		}
		if (connector != null) {
			connector.dispose();
		}
	}