commit | 79b91bfe746121a81a785bdd3b24df2096410c55 | [log] [tgz] |
---|---|---|
author | Christian Aistleitner <christian@quelltextlich.at> | Wed Apr 10 23:09:55 2013 +0200 |
committer | Christian Aistleitner <christian@quelltextlich.at> | Wed Apr 10 23:35:18 2013 +0200 |
tree | 9007c118dcbec98490f6315e8e6bdc63e1eb781a | |
parent | b4b74b445da5bd67189a32d04a6639cc77b44930 [diff] |
Read initial ack for scp OpenSSH's scp sends an initial ack after the arguments (see scp.c:sink in line 914 of CVS version 1.171). We did not read this initial ack, and hence the protocol on gerrit side got out of sync with the client. This problem introduced a race condition, which could manifest in a "lost connection" message on the scp client side. We now read the client's initial ack, and thereby get gerrit and scp in sync again. Change-Id: Ic6f42aee69e1163bff1f22b40f16a00fc366f902
diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ScpCommand.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ScpCommand.java index 09c25ff..987380f 100644 --- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ScpCommand.java +++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ScpCommand.java
@@ -92,6 +92,7 @@ private void runImp() { try { + readAck(); if (error != null) { throw error; }