Correctly exit fetch negotiation for stateless RPC connections
Commit 9530c10192
(2018-02-11)
"Add a minimum negotiation feature for fetch" made fetch
negotiation cheaper for repos with huge numbers of
references (we are seeing a 15x reduction in maximum fetch
times for chromium/chromium/src on trans-Pacific links).
But it inadvertently broke the handling of stateless RPC
connections, so fix that here.
Change-Id: I0090aa76ffecc55801ebb833ac2e0c933a4a7c54
Signed-off-by: Terry Parker <tparker@google.com>
This commit is contained in:
parent
c0bb992845
commit
5a74b586b3
|
@ -634,6 +634,9 @@ private void negotiate(final ProgressMonitor monitor) throws IOException,
|
|||
// Minimal negotiation was requested and we sent out our
|
||||
// current reference values for our wants, so terminate
|
||||
// negotiation early.
|
||||
if (statelessRPC) {
|
||||
state.writeTo(out, null);
|
||||
}
|
||||
break SEND_HAVES;
|
||||
}
|
||||
break READ_RESULT;
|
||||
|
@ -669,6 +672,9 @@ private void negotiate(final ProgressMonitor monitor) throws IOException,
|
|||
if (minimalNegotiationSet != null && minimalNegotiationSet.isEmpty()) {
|
||||
// Minimal negotiation was requested and we sent out our current reference
|
||||
// values for our wants, so terminate negotiation early.
|
||||
if (statelessRPC) {
|
||||
state.writeTo(out, null);
|
||||
}
|
||||
break SEND_HAVES;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue