diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-07-27 13:25:18 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-07-27 13:25:18 +0200 |
commit | 353b7bab08704cd2f7e2b6951c9dcd7cf3023e3a (patch) | |
tree | 29f5fca8d23f0bccd21cc8ad4319ce5dc3f976f0 /methods | |
parent | b9c20219dc17db1d29eaf297263a4b008bd1b90b (diff) | |
download | apt-353b7bab08704cd2f7e2b6951c9dcd7cf3023e3a.tar.gz |
http: skip requesting if pipeline is full
The rewrite in 742f67eaede80d2f9b3631d8697ebd63b8f95427 is based on the
assumption that the pipeline will always be at least one item short each
time it is called, but the logs in #832113 suggest that this isn't
always the case. I fail to see how at the moment, but the old
implementation had this behavior, so restoring it can't really hurt, can
it?
Diffstat (limited to 'methods')
-rw-r--r-- | methods/server.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/methods/server.cc b/methods/server.cc index 461143388..6d147fe12 100644 --- a/methods/server.cc +++ b/methods/server.cc @@ -427,6 +427,8 @@ bool ServerMethod::Fetch(FetchItem *) decltype(PipelineDepth) CurrentDepth = 0; for (FetchItem const *I = Queue; I != QueueBack; I = I->Next) ++CurrentDepth; + if (CurrentDepth > AllowedDepth) + return true; do { // Make sure we stick with the same server |