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;
}
}