]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Ticket 2048: make OMB posting HTTP timeout configurable as $config['omb']['timeout...
authorBrion Vibber <brion@pobox.com>
Tue, 1 Dec 2009 22:38:34 +0000 (14:38 -0800)
committerBrion Vibber <brion@pobox.com>
Tue, 1 Dec 2009 22:50:18 +0000 (14:50 -0800)
lib/default.php
lib/omb.php

index 95366e0b329e965cc1fb7393e1e06a2fdd2b0d0a..d4ef045ea501c66a678ead061b343b4c5aafba58 100644 (file)
@@ -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
         );
index e2a6d9f3f529f6004ef51c3846ad68a1b31143a6..0f38a49369fc34c8de680a0b5fe90236c65fe161 100644 (file)
@@ -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'));
     }
 
 }