public function disconnect()
{
// Close session if we have one
if (null !== $this->_sessionHandle) {
$this->_client->CloseSession(new \ThriftSQL\TCloseSessionReq(array('sessionHandle' => $this->_sessionHandle)));
}
$this->_sessionHandle = null;
// Clear out the client
$this->_client = null;
// Close the socket
if (null !== $this->_transport) {
$this->_transport->close();
}
$this->_transport = null;
}