Skip to content

Commit

Permalink
Make blocking check more consistent with rest of the code
Browse files Browse the repository at this point in the history
  • Loading branch information
schlessera committed Sep 11, 2023
1 parent e67a478 commit 30afc43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Transport/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public function request($url, $headers = [], $data = [], $options = []) {
try {
$this->process_response($response, $options);
} finally {
if (!isset($options['blocking']) || $options['blocking'] !== false) {
if (isset($options['blocking']) && $options['blocking'] === true) {
// Need to remove the $this reference from the curl handle.
// Otherwise \WpOrg\Requests\Transport\Curl won't be garbage collected and the curl_close() will never be called.
curl_setopt($this->handle, CURLOPT_HEADERFUNCTION, null);
Expand Down

0 comments on commit 30afc43

Please sign in to comment.