summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2009-12-01 14:38:34 -0800
committerBrion Vibber <brion@pobox.com>2009-12-01 14:50:18 -0800
commit15a9c869794ea3948086afa5310696e1250d9a26 (patch)
tree2e4cd2281ed778082157437890d556846b66f74b
parent8b63717bf9828a4219578d05ce8eeb59616fde7d (diff)
Ticket 2048: make OMB posting HTTP timeout configurable as $config['omb']['timeout']; defaults to 5 seconds instead of 20-second default in Yadis library
-rw-r--r--lib/default.php2
-rw-r--r--lib/omb.php1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/default.php b/lib/default.php
index 95366e0b3..d4ef045ea 100644
--- a/lib/default.php
+++ b/lib/default.php
@@ -226,4 +226,6 @@ $default =
array('contentlimit' => null),
'location' =>
array('namespace' => 1), // 1 = geonames, 2 = Yahoo Where on Earth
+ 'omb' =>
+ array('timeout' => 5), // HTTP request timeout in seconds when contacting remote hosts for OMB updates
);
diff --git a/lib/omb.php b/lib/omb.php
index e2a6d9f3f..0f38a4936 100644
--- a/lib/omb.php
+++ b/lib/omb.php
@@ -167,6 +167,7 @@ class StatusNet_OMB_Service_Consumer extends OMB_Service_Consumer {
$this->datastore = omb_oauth_datastore();
$this->oauth_consumer = omb_oauth_consumer();
$this->fetcher = Auth_Yadis_Yadis::getHTTPFetcher();
+ $this->fetcher->timeout = intval(common_config('omb', 'timeout'));
}
}