mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-29 23:00:33 +00:00
poloniex: do not throw exceptions on curl errors
This commit is contained in:
parent
17875d358f
commit
fe4dc4e25a
1 changed files with 5 additions and 1 deletions
|
@ -49,12 +49,16 @@ class poloniex
|
|||
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 40);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
|
||||
// run the query
|
||||
$res = curl_exec($ch);
|
||||
|
||||
if ($res === false) throw new Exception('Curl error: '.curl_error($ch));
|
||||
if ($res === false) {
|
||||
debuglog('poloniex: curl error '.curl_error($ch));
|
||||
return false;
|
||||
}
|
||||
//echo $res;
|
||||
$dec = json_decode($res, true);
|
||||
if (!$dec){
|
||||
|
|
Loading…
Add table
Reference in a new issue