From b3ca614cbe3c93eb20475e9e68e3c273c4328c79 Mon Sep 17 00:00:00 2001 From: Gnieark Date: Mon, 12 Dec 2016 20:09:39 +0100 Subject: [PATCH] CURLOPT_CONNECTTIMEOUT is not same as CURLOPT_TIMEOUT --- countBattles.txt | 2 +- src/arenas/tron/TronGame.php | 3 ++- src/functions.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/countBattles.txt b/countBattles.txt index 0fba8d1..3a657e2 100755 --- a/countBattles.txt +++ b/countBattles.txt @@ -1 +1 @@ -1845 \ No newline at end of file +1853 \ No newline at end of file diff --git a/src/arenas/tron/TronGame.php b/src/arenas/tron/TronGame.php index 88ec16c..33bd148 100755 --- a/src/arenas/tron/TronGame.php +++ b/src/arenas/tron/TronGame.php @@ -106,7 +106,8 @@ class TronGame curl_setopt($ch[$i], CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch[$i], CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch[$i], CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch[$i], CURLOPT_CONNECTTIMEOUT, 10); + //curl_setopt($ch[$i], CURLOPT_CONNECTTIMEOUT, 10); + curl_setopt($ch[$i], CURLOPT_TIMEOUT, 10); curl_setopt($ch[$i], CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($data_string)) diff --git a/src/functions.php b/src/functions.php index 1e1c782..e828e7f 100755 --- a/src/functions.php +++ b/src/functions.php @@ -346,7 +346,7 @@ function get_IA_Response($iaUrl,$postParams){ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); + curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($data_string))