Skip to content

Commit

Permalink
Separate redirect history for each worker
Browse files Browse the repository at this point in the history
  • Loading branch information
mattias-p committed Jun 13, 2023
1 parent b37b4b7 commit 43039e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning].
## [Unreleased]
### Fixed
- Fix connection errors with domains resolved to IPv6 addresses.
- Workers no longer dirty each other's redirect histories.

### Added
- New --link-only flag ([#30], courtesy of [@egrieco]).
Expand Down
10 changes: 5 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ fn main() {

let prefixes: Vec<_> = opt.prefixes.iter().map(AsRef::as_ref).collect();
let resolver = FragResolver::from(&prefixes);
let client = if opt.check {
let make_client = if opt.check {
if opt.redirect {
Some(Client::new_follow())
|| Some(Client::new_follow())
} else {
Some(Client::new_no_follow())
|| Some(Client::new_no_follow())
}
} else {
None
|| None
};

let o = Orderer {
Expand Down Expand Up @@ -244,7 +244,7 @@ fn main() {
.fold(HashMap::new(), group_fragments)
.into_par_iter()
.flat_map(|(base, fragments)| {
let document = client
let document = make_client()
.as_ref()
.map(|client| client.fetch_link(opt.urldecode, &base));

Expand Down

0 comments on commit 43039e0

Please sign in to comment.