Skip to content

Commit 70e4413

Browse files
authored
Merge pull request #189 from bc-AlyssNoland/deadlock-fixes
Updated connection.php with Jasper Studios fixes to resolve deadlocking
2 parents 71c6d49 + 36718d6 commit 70e4413

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/Bigcommerce/Api/Connection.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,8 @@ public function get($url, $query = false)
365365

366366
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'GET');
367367
curl_setopt($this->curl, CURLOPT_URL, $url);
368+
curl_setopt($this->curl, CURLOPT_POST, false);
369+
curl_setopt($this->curl, CURLOPT_PUT, false);
368370
curl_setopt($this->curl, CURLOPT_HTTPGET, true);
369371
curl_exec($this->curl);
370372

@@ -392,6 +394,8 @@ public function post($url, $body)
392394
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'POST');
393395
curl_setopt($this->curl, CURLOPT_URL, $url);
394396
curl_setopt($this->curl, CURLOPT_POST, true);
397+
curl_setopt($this->curl, CURLOPT_PUT, false);
398+
curl_setopt($this->curl, CURLOPT_HTTPGET, false);
395399
curl_setopt($this->curl, CURLOPT_POSTFIELDS, $body);
396400
curl_exec($this->curl);
397401

@@ -444,6 +448,8 @@ public function put($url, $body)
444448

445449
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
446450
curl_setopt($this->curl, CURLOPT_URL, $url);
451+
curl_setopt($this->curl, CURLOPT_HTTPGET, false);
452+
curl_setopt($this->curl, CURLOPT_POST, false);
447453
curl_setopt($this->curl, CURLOPT_PUT, true);
448454
curl_exec($this->curl);
449455

@@ -463,6 +469,9 @@ public function delete($url)
463469
{
464470
$this->initializeRequest();
465471

472+
curl_setopt($this->curl, CURLOPT_PUT, false);
473+
curl_setopt($this->curl, CURLOPT_HTTPGET, false);
474+
curl_setopt($this->curl, CURLOPT_POST, false);
466475
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'DELETE');
467476
curl_setopt($this->curl, CURLOPT_URL, $url);
468477
curl_exec($this->curl);

0 commit comments

Comments
 (0)