• Модуль: security
  • Путь к файлу: ~/bitrix/modules/security/classes/general/tests/cloud_monitor.php
  • Класс: CSecurityCloudMonitorTest
  • Вызов: CSecurityCloudMonitorTest::doCheckRequest
protected function doCheckRequest()
{
	$response = new CSecurityCloudMonitorRequest('check', $this->protocolVersion);
	if($response->isOk())
	{
		$this->sessionData->flushData();
		$this->setTimeOut($response->getValue('processing_time'));
		$this->setCheckingToken($response->getValue('testing_token'));
	}
	elseif($response->isFatalError())
	{
		$this->stopChecking($response->getValue('error_text'));
	}
	else
	{
		if($this->sessionData->getBool('repeat_request'))
		{
			if($this->sessionData->getInt('check_repeat_count') > self::MAX_CHECKING_REQUEST_REPEAT_COUNT)
			{
				$this->stopChecking(GetMessage('SECURITY_SITE_CHECKER_CLOUD_UNAVAILABLE'));
			}
			else
			{
				$this->sessionData->increment('check_repeat_count');
			}
		}
		else
		{
			$this->sessionData->flushData();
			$this->sessionData->setData('repeat_request', true);
		}
	}
}