Commit c63849d9f8380c23210dfb0a3c59c99d6c42202a
1 parent
f0e49f6f
Exists in
master
and in
5 other branches
Mudança do timeout do serviço para impedir perda de conexão
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
rn/PendenciasTramiteRN.php
| ... | ... | @@ -6,7 +6,7 @@ error_reporting(E_ALL); |
| 6 | 6 | |
| 7 | 7 | class PendenciasTramiteRN extends InfraRN { |
| 8 | 8 | |
| 9 | - const TIMEOUT_SERVICO_PENDENCIAS = 600; | |
| 9 | + const TIMEOUT_SERVICO_PENDENCIAS = 300; | |
| 10 | 10 | |
| 11 | 11 | private static $instance = null; |
| 12 | 12 | private $strEnderecoServicoPendencias = null; |
| ... | ... | @@ -97,11 +97,13 @@ class PendenciasTramiteRN extends InfraRN { |
| 97 | 97 | { |
| 98 | 98 | $curl = curl_init($this->strEnderecoServicoPendencias); |
| 99 | 99 | curl_setopt($curl, CURLOPT_URL, $this->strEnderecoServicoPendencias); |
| 100 | + curl_setopt($curl, CURLOPT_TIMEOUT, self::TIMEOUT_SERVICO_PENDENCIAS); | |
| 100 | 101 | curl_setopt($curl, CURLOPT_HEADER, 0); |
| 101 | 102 | curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); |
| 102 | 103 | curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); |
| 103 | 104 | curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); |
| 104 | 105 | curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); |
| 106 | + curl_setopt($curl, CURLOPT_FAILONERROR, true); | |
| 105 | 107 | curl_setopt($curl, CURLOPT_SSLCERT, $this->strLocalizacaoCertificadoDigital); |
| 106 | 108 | curl_setopt($curl, CURLOPT_SSLCERTPASSWD, $this->strSenhaCertificadoDigital); |
| 107 | 109 | curl_setopt($curl, CURLOPT_TIMEOUT, self::TIMEOUT_SERVICO_PENDENCIAS); | ... | ... |