minimal header import and client service

This commit is contained in:
Robert Habermeier
2016-12-15 18:45:11 +01:00
parent f776f48023
commit 5346539ef8
3 changed files with 102 additions and 3 deletions

View File

@@ -225,6 +225,7 @@ impl Fetcher {
}
self.complete_requests.insert(subchain_parent, request);
self.collect_ready();
}
// state transition not triggered until drain is finished.
@@ -267,8 +268,6 @@ impl Fetcher {
}
fn drain(mut self, headers: &mut Vec<Header>, max: usize) -> SyncRound {
self.collect_ready();
let max = ::std::cmp::min(max, self.ready.len());
headers.extend(self.ready.drain(0..max));