Browse Source

Do not requeue state vector in stateless RPC fetch

If the no-done capability was enabled on the connection, don't
queue up the state vector again once the ACK %s ready message
is observed from the remote. The pack will be following in this
response stream, so the state vector is no longer required.

Change-Id: I7bd1e76957cb58c7ff1cdaeef227f1b02a7e5d24
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
stable-1.2
Shawn O. Pearce 13 years ago
parent
commit
38b3816d65
  1. 4
      org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java

4
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java

@ -455,7 +455,7 @@ public abstract class BasePackFetchConnection extends BasePackConnection
state.writeTo(out, null);
negotiateBegin();
SEND_HAVES: while (!receivedReady) {
SEND_HAVES: for (;;) {
final RevCommit c = walk.next();
if (c == null)
break SEND_HAVES;
@ -530,6 +530,8 @@ public abstract class BasePackFetchConnection extends BasePackConnection
throw new CancelledException();
}
if (noDone & receivedReady)
break SEND_HAVES;
if (statelessRPC)
state.writeTo(out, null);

Loading…
Cancel
Save