yii\elasticsearch\Connection::close PHP Method

close() public method

It does nothing if the connection is already closed.
public close ( )
    public function close()
    {
        if ($this->activeNode === null) {
            return;
        }
        Yii::trace('Closing connection to elasticsearch. Active node was: ' . $this->nodes[$this->activeNode]['http_address'], __CLASS__);
        $this->activeNode = null;
        if ($this->_curl) {
            curl_close($this->_curl);
            $this->_curl = null;
        }
    }