diff --git a/src/future/oauth/PhutilOAuth1Future.php b/src/future/oauth/PhutilOAuth1Future.php --- a/src/future/oauth/PhutilOAuth1Future.php +++ b/src/future/oauth/PhutilOAuth1Future.php @@ -23,6 +23,7 @@ private $hasConstructedFuture; private $callbackURI; private $headers = array(); + private $timeout; public function setCallbackURI($callback_uri) { $this->callbackURI = $callback_uri; @@ -74,6 +75,15 @@ return $this; } + public function setTimeout($timeout) { + $this->timeout = $timeout; + return $this; + } + + public function getTimeout() { + return $this->timeout; + } + public function __construct($uri, $data = array()) { $this->uri = new PhutilURI((string)$uri); $this->data = $data; @@ -135,6 +145,11 @@ } $this->headers = array(); + $timeout = $this->getTimeout(); + if ($timeout !== null) { + $future->setTimeout($timeout); + } + $this->hasConstructedFuture = true; }