/**
  * Try to start checking (send special request to Bitrix)
  */
 protected function doCheckRequest()
 {
     $response = new CSecurityCloudMonitorRequest("check");
     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_REPEATE_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);
         }
     }
 }
Beispiel #2
0
 /**
  * Try to start checking (send special request to Bitrix)
  */
 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_REPEATE_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);
         }
     }
 }