Skip to content

Commit

Permalink
Fix condition to check CfT mirror in URL handler
Browse files Browse the repository at this point in the history
  • Loading branch information
bonigarcia committed Apr 4, 2024
1 parent 9193a3b commit 530e923
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -1446,11 +1446,12 @@ protected UrlHandler createUrlHandler(String driverVersion)

boolean getLatest = isUnknown(driverVersion);
boolean continueSearchingVersion;
boolean isCfT = isChrome() && VersionDetector.isCfT(driverVersion);
boolean isMirrorCfT = isChrome() && isUseMirror()
&& VersionDetector.isCfT(driverVersion);

do {
// Filter by driver name
if (!isCfT) {
if (!isMirrorCfT) {
urlHandler.filterByDriverName(shortDriverName);
}

Expand Down Expand Up @@ -1506,7 +1507,7 @@ protected UrlHandler createUrlHandler(String driverVersion)
}
} while (continueSearchingVersion);

if (isCfT) {
if (isMirrorCfT) {
List<URL> driversFromMirror = getMirrorUrls(
urlHandler.getCandidateUrl(), "");
urlHandler.setCandidateUrls(driversFromMirror);
Expand Down

0 comments on commit 530e923

Please sign in to comment.