Add new config - number_of_hosts
This commit is contained in:
@@ -86,7 +86,7 @@ func MainApp(configPath string) {
|
||||
log.Named("unrestrict_client"),
|
||||
)
|
||||
|
||||
hosts := repo.GetOptimalHosts(config.ShouldForceIPv6())
|
||||
hosts := repo.GetOptimalHosts(config.GetNumberOfHosts(), config.ShouldForceIPv6())
|
||||
zurglog.Debugf("Optimal hosts (%d): %v", len(hosts), hosts)
|
||||
|
||||
downloadClient := http.NewHTTPClient(
|
||||
@@ -99,7 +99,7 @@ func MainApp(configPath string) {
|
||||
log.Named("download_client"),
|
||||
)
|
||||
|
||||
workerPool, err := ants.NewPool(config.GetNumOfWorkers())
|
||||
workerPool, err := ants.NewPool(config.GetNumberOfWorkers())
|
||||
if err != nil {
|
||||
zurglog.Errorf("Failed to create worker pool: %v", err)
|
||||
os.Exit(1)
|
||||
|
||||
Reference in New Issue
Block a user