Page MenuHomePhabricator

D13985.diff
No OneTemporary

D13985.diff

diff --git a/src/applications/drydock/interface/command/DrydockSSHCommandInterface.php b/src/applications/drydock/interface/command/DrydockSSHCommandInterface.php
--- a/src/applications/drydock/interface/command/DrydockSSHCommandInterface.php
+++ b/src/applications/drydock/interface/command/DrydockSSHCommandInterface.php
@@ -4,6 +4,7 @@
private $passphraseSSHKey;
private $connectTimeout;
+ private $execTimeout;
private function openCredentialsIfNotOpen() {
if ($this->passphraseSSHKey !== null) {
@@ -38,6 +39,11 @@
return $this;
}
+ public function setExecTimeout($timeout) {
+ $this->execTimeout = $timeout;
+ return $this;
+ }
+
public function getExecFuture($command) {
$this->openCredentialsIfNotOpen();
@@ -52,7 +58,7 @@
'ConnectTimeout='.$this->connectTimeout);
}
- return new ExecFuture(
+ $future = new ExecFuture(
'ssh '.
'-o LogLevel=quiet '.
'-o StrictHostKeyChecking=no '.
@@ -65,5 +71,7 @@
$this->passphraseSSHKey->getUsernameEnvelope(),
$this->getConfig('host'),
$full_command);
+ $future->setTimeout($this->execTimeout);
+ return $future;
}
}

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 2, 5:59 AM (6 d, 6 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7589494
Default Alt Text
D13985.diff (1 KB)

Event Timeline