Closes listener.

@param bool $drop Argument is not used by listener

@throws NodeDisconnectException
432100
public function disconnect($drop = false)
    {
        if(is_resource($this->socket)) {
            fclose($this->socket);
        } else {
            $this->logger->warning("Socket is not resource in $this - cannot close it.");
        }

        $this->logger->info("Listener $this closed");

        throw new NodeDisconnectException($this);
    }
432130
public function close()
    {
        if ($this->closed)
        {
            return;
        }

        $this->emit('end', [ $this ]);
        $this->loop->removeStream($this->fd);
        $this->buffer->flushListeners();
        $this->flushListeners();
        unset($this->socket);
        $this->closed = true;
    }
1240370
function _close()
	{
		if ($this->connection->_stmt === $this->_queryID) {
			$this->connection->_stmt = false;
		}
		if (!empty($this->_refcursor)) {
			oci_free_cursor($this->_refcursor);
			$this->_refcursor = false;
		}
		@oci_free_statement($this->_queryID);
		$this->_queryID = false;
	}
433852
public function unlockDrop(Drop $drop)
    {
        $this->om->startFlushSuite();

        $drop->setUnlockedDrop(true);
        $this->checkSuccess($drop);
        $this->om->persist($drop);

        $this->om->endFlushSuite();

        return $drop;
    }
911754
public function close( $quit = FALSE )
	{
		if( !$quit )
			$this->checkConnection( TRUE, FALSE );
		if( !@ftp_quit( $this->resource ) )
			return FALSE;
		$this->auth		= FALSE;
		$this->resource	= NULL;
		return TRUE;
	}
1203138
public function disconnect(Connection $connection = null) {
		if(!isset($connection)) {
			$this->connection->close();
		} else {
			$connection->close();
		}
	}
1157013
public function closeConnection(): void
    {
        if ($this->isConnected) {
            @$this->currentLink->close();
            $this->isConnected = false;
            $this->currentLink = null;
            $this->currentDB = null;
            $this->selectedDB = '';
        }
    }
509676
public function closeConnection () {
        if ( $this->transport->getSmtp()->isConnect()) {
            $this->transport->getSmtp()->rset();
            $this->transport->getSmtp()->disconnect();
        }
    }
1108245
public function closeConnection()
    {
        $this->db_connected = false;
        $this->db_index     = 0;

        // release statement and connection resources
        $this->last_result  = null;
        $this->dbh          = null;
        $this->dbhs         = array();
    }
331021
public function deleteDrop(Drop $drop)
    {
        $this->om->startFlushSuite();
        $documents = $drop->getDocuments();

        foreach ($documents as $document) {
            $this->deleteDocument($document);
        }
        $this->om->remove($drop);
        $this->om->endFlushSuite();
    }
1233410
protected function disconnect()
    {
        $this->log('closing sockets ... ', Net_Notifier_Logger::VERBOSITY_ALL);

        foreach ($this->clients as $client) {
            $client->startClose(
                Net_Notifier_WebSocket_Connection::CLOSE_GOING_AWAY,
                'Server shutting down.'
            );
        }

        $this->clients = array();
        $this->socket  = null;

        $this->log('done' . PHP_EOL, Net_Notifier_Logger::VERBOSITY_ALL, false);

        $this->connected = false;
    }
134325
public void disconnect(Node<T> o, Node<T> t) {
    if (!o.equals(t)) {
      o.disconnectFrom(t);
      t.disconnectFrom(o);
    }
  }
1315307
public function onClose($server, $fd, $reactorId)
    {
        if (!$this->isServerWebsocket($fd) || !$server instanceof Server) {
            return;
        }

        /** @var Websocket $websocket */
        $websocket = $this->app->make(Websocket::class);

        try {
            $websocket->reset(true)->setSender($fd);
            // trigger 'disconnect' websocket event
            if ($websocket->eventExists('disconnect')) {
                $websocket->call('disconnect');
            } else {
                $this->websocketHandler->onClose($fd, $reactorId);
            }
            // leave all rooms
            $websocket->leave();
        } catch (Throwable $e) {
            $this->logServerError($e);
        }
    }
1049650
function close($socket) {
		if (isset($this->agents[(int)$socket]))
			unset($this->sockets[(int)$socket],$this->agents[(int)$socket]);
		stream_socket_shutdown($socket,STREAM_SHUT_WR);
		@fclose($socket);
	}
239533
public function leaveNode(Node $node)
    {
        if (self::isConditional($node)) {
            $this->conditionalScopes--;
        } elseif ($node instanceof FuncCall) {
            // if function name is an expression or a variable, give it a pass for now.
            $name = $node->name;
            if (!$name instanceof Expr && !$name instanceof Variable) {
                $shortName = \implode('\\', $name->parts);
                $fullName  = $this->getFullyQualifiedName($name);
                $inScope   = isset($this->currentScope[\strtolower($fullName)]);
                if (!$inScope && !\function_exists($shortName) && !\function_exists($fullName)) {
                    $message = \sprintf('Call to undefined function %s()', $name);
                    throw new FatalErrorException($message, 0, E_ERROR, null, $node->getLine());
                }
            }
        }
    }
944452
@Override
    public boolean close () throws CIFSException {
        boolean inUse = false;
        
        List<SmbTransportImpl> toClose;
        synchronized ( this.connections ) {
            log.debug("Closing pool");
            toClose = new LinkedList<>(this.connections);
            toClose.addAll(this.nonPooledConnections);
            this.connections.clear();
            this.nonPooledConnections.clear();
        }
        for ( SmbTransportImpl conn : toClose ) {
            try {
                inUse |= conn.disconnect(false, false);
            }
            catch ( IOException e ) {
                log.warn("Failed to close connection", e);
            }
        }
        return inUse;
    }
680787
protected void stop(boolean close) throws IOException {
        if(!thread.isInterrupted()) {
            thread.interrupt();
        }

        conHandler.onDisconnected();

        if(close) con.close();
    }