Skip to content

Commit 30afc43

Browse files
committed
Make blocking check more consistent with rest of the code
1 parent e67a478 commit 30afc43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Transport/Curl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public function request($url, $headers = [], $data = [], $options = []) {
241241
try {
242242
$this->process_response($response, $options);
243243
} finally {
244-
if (!isset($options['blocking']) || $options['blocking'] !== false) {
244+
if (isset($options['blocking']) && $options['blocking'] === true) {
245245
// Need to remove the $this reference from the curl handle.
246246
// Otherwise \WpOrg\Requests\Transport\Curl won't be garbage collected and the curl_close() will never be called.
247247
curl_setopt($this->handle, CURLOPT_HEADERFUNCTION, null);

0 commit comments

Comments
 (0)