Skip to content

Commit

Permalink
Merge pull request #4 from Artem-Panasenko/6.5/RT-1807-keep-alive-curl
Browse files Browse the repository at this point in the history
RT-1807 Fix bug when undefined constant
  • Loading branch information
tatyana-shmatchenko committed May 10, 2016
2 parents da1aa8c + f02f794 commit b24b6ee
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ public function __construct(array $options = array(), $followLocationMaxRedirect
CURLOPT_HEADER => true,
CURLOPT_USERAGENT => $options['user_agent'],
CURLINFO_HEADER_OUT => true,
CURLOPT_TCP_KEEPALIVE => 1,
CURLOPT_TCP_KEEPIDLE => 180,
CURLOPT_TCP_KEEPINTVL => 60,
);
if (defined('CURLOPT_TCP_KEEPALIVE')) {
$curlOptions[CURLOPT_TCP_KEEPALIVE] = 1;
$curlOptions[CURLOPT_TCP_KEEPIDLE] = 180;
$curlOptions[CURLOPT_TCP_KEEPINTVL] = 60;
}
curl_setopt_array($this->ch, $curlOptions);
if (isset($options['compression']) && !($options['compression'] & SOAP_COMPRESSION_ACCEPT)) {
curl_setopt($this->ch, CURLOPT_ENCODING, 'identity');
Expand Down

0 comments on commit b24b6ee

Please sign in to comment.