Page MenuHomePhabricator

D19980.diff
No OneTemporary

D19980.diff

diff --git a/src/future/postmark/PhutilPostmarkFuture.php b/src/future/postmark/PhutilPostmarkFuture.php
--- a/src/future/postmark/PhutilPostmarkFuture.php
+++ b/src/future/postmark/PhutilPostmarkFuture.php
@@ -6,6 +6,7 @@
private $accessToken;
private $method;
private $parameters;
+ private $timeout;
public function __construct() {
parent::__construct(null);
@@ -27,6 +28,15 @@
return $this;
}
+ public function setTimeout($timeout) {
+ $this->timeout = $timeout;
+ return $this;
+ }
+
+ public function getTimeout() {
+ return $this->timeout;
+ }
+
protected function getProxiedFuture() {
if (!$this->future) {
if ($this->accessToken === null) {
@@ -49,6 +59,11 @@
->addHeader('Accept', 'application/json')
->addHeader('Content-Type', 'application/json');
+ $timeout = $this->getTimeout();
+ if ($timeout) {
+ $future->setTimeout($timeout);
+ }
+
$this->future = $future;
}

File Metadata

Mime Type
text/plain
Expires
Thu, Feb 27, 9:35 AM (14 h, 42 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7211563
Default Alt Text
D19980.diff (993 B)

Event Timeline