From f0c5fb4f1503bb71d3d402ea1ab8f7b9075be015 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 21 Dec 2009 19:34:38 +0000 Subject: [PATCH] Don't use CURLOPT_CONNECTTIMEOUT_MS or CURLOPT_TIMEOUT_MS due to bugginess. fixes #11505 see #11499 git-svn-id: https://develop.svn.wordpress.org/trunk@12472 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/http.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/wp-includes/http.php b/wp-includes/http.php index d8086befbd..46b94c7c59 100644 --- a/wp-includes/http.php +++ b/wp-includes/http.php @@ -1296,16 +1296,9 @@ class WP_Http_Curl { // CURLOPT_TIMEOUT and CURLOPT_CONNECTTIMEOUT expect integers. Have to use ceil since // a value of 0 will allow an ulimited timeout. - // Use _MS if available. - if ( defined( 'CURLOPT_TIMEOUT_MS' ) ) { - $timeout_ms = (int) ceil( 1000 * $r['timeout'] ); - curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT_MS, $timeout_ms ); - curl_setopt( $handle, CURLOPT_TIMEOUT_MS, $timeout_ms ); - } else { - $timeout = (int) ceil( $r['timeout'] ); - curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, $timeout ); - curl_setopt( $handle, CURLOPT_TIMEOUT, $timeout ); - } + $timeout = (int) ceil( $r['timeout'] ); + curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, $timeout ); + curl_setopt( $handle, CURLOPT_TIMEOUT, $timeout ); curl_setopt( $handle, CURLOPT_URL, $url); curl_setopt( $handle, CURLOPT_RETURNTRANSFER, true );