summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2015-04-15 10:32:20 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2015-04-15 10:32:26 +0900
commit1fc7654ab88d138454afbb1f6a11790394f9154d (patch)
treed2e06c2b3b5ed367fcb29b5074f941d28cbc955c
parent90c23d25bdef78bd7f5639cedf9a4790e0437ebe (diff)
parent16db002a0bfe6559a6395dabf155b7a8bfadc968 (diff)
Merge branch 'stable-2.10' into stable-2.11v2.11
* stable-2.10: Set connection timeout to 120 sec for SSH remote operations Change-Id: Icec15cad4912a5a8c38ab73694fd200fa7f64cd2
-rw-r--r--src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java
index 789e26a..617dc02 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java
@@ -62,6 +62,7 @@ class ReplicationQueue implements
HeadUpdatedListener {
static final String REPLICATION_LOG_NAME = "replication_log";
static final Logger repLog = LoggerFactory.getLogger(REPLICATION_LOG_NAME);
+ private static final int SSH_REMOTE_TIMEOUT = 120 * 1000;
private static final ReplicationStateLogger stateLog =
new ReplicationStateLogger(repLog);
@@ -423,7 +424,8 @@ class ReplicationQueue implements
}
private static RemoteSession connect(URIish uri) throws TransportException {
- return SshSessionFactory.getInstance().getSession(uri, null, FS.DETECTED, 0);
+ return SshSessionFactory.getInstance().getSession(uri, null, FS.DETECTED,
+ SSH_REMOTE_TIMEOUT);
}
private static OutputStream newErrorBufferStream() {