Timeout changes. Hat tip: Michael Dale.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
692b713381
commit
aae9dbf02d
|
@ -561,7 +561,7 @@ function trackback($trackback_url, $title, $excerpt, $ID) {
|
||||||
$http_request .= $query_string;
|
$http_request .= $query_string;
|
||||||
if ( '' == $trackback_url['port'] )
|
if ( '' == $trackback_url['port'] )
|
||||||
$trackback_url['port'] = 80;
|
$trackback_url['port'] = 80;
|
||||||
$fs = @fsockopen($trackback_url['host'], $trackback_url['port']);
|
$fs = @fsockopen($trackback_url['host'], $trackback_url['port'], $errno, $errstr, 4);
|
||||||
@fputs($fs, $http_request);
|
@fputs($fs, $http_request);
|
||||||
/*
|
/*
|
||||||
$debug_file = 'trackback.log';
|
$debug_file = 'trackback.log';
|
||||||
|
@ -720,7 +720,7 @@ include_once (ABSPATH . WPINC . '/class-xmlrpcs.php');
|
||||||
$port = isset($bits['port']) ? $bits['port'] : 80;
|
$port = isset($bits['port']) ? $bits['port'] : 80;
|
||||||
|
|
||||||
// Try to connect to the server at $host
|
// Try to connect to the server at $host
|
||||||
$fp = fsockopen($host, $port, $errno, $errstr, 30);
|
$fp = fsockopen($host, $port, $errno, $errstr, 3);
|
||||||
if (!$fp) {
|
if (!$fp) {
|
||||||
debug_fwrite($log, 'Couldn\'t open a connection to '.$host."\n\n");
|
debug_fwrite($log, 'Couldn\'t open a connection to '.$host."\n\n");
|
||||||
continue;
|
continue;
|
||||||
|
@ -853,7 +853,7 @@ function doGeoUrlHeader($post_list = '') {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRemoteFile($host,$path) {
|
function getRemoteFile($host,$path) {
|
||||||
$fp = fsockopen($host, 80, $errno, $errstr);
|
$fp = fsockopen($host, 80, $errno, $errstr, 5);
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
fputs($fp,"GET $path HTTP/1.0\r\nHost: $host\r\n\r\n");
|
fputs($fp,"GET $path HTTP/1.0\r\nHost: $host\r\n\r\n");
|
||||||
while ($line = fgets($fp, 4096)) {
|
while ($line = fgets($fp, 4096)) {
|
||||||
|
|
Loading…
Reference in New Issue