Remove any fatal error messages to prevent crashes
This commit is contained in:
@@ -64,13 +64,24 @@ func MainApp(configPath string) {
|
||||
repoClient4 := http.NewHTTPClient("", 0, 1, false, []string{}, proxyURL, log.Named("network_test"))
|
||||
repoClient6 := http.NewHTTPClient("", 0, 1, true, []string{}, proxyURL, log.Named("network_test"))
|
||||
repo := http.NewIPRepository(repoClient4, repoClient6, "", log.Named("network_test"))
|
||||
repo.NetworkTest(false, config.ShouldCacheNetworkTestResults())
|
||||
|
||||
hosts := repo.GetHosts(config.GetNumberOfHosts(), config.ShouldForceIPv6())
|
||||
var hosts []string
|
||||
repo.NetworkTest(false, config.ShouldCacheNetworkTestResults())
|
||||
hosts = repo.GetHosts(config.GetNumberOfHosts(), config.ShouldForceIPv6())
|
||||
if len(hosts) == 0 {
|
||||
zurglog.Fatal("No reachable hosts found. We cannot continue! (check if Real-Debrid is down or they have blocked your IP address)")
|
||||
zurglog.Errorf("No reachable hosts found. Trying again.")
|
||||
for {
|
||||
repo.NetworkTest(true, config.ShouldCacheNetworkTestResults())
|
||||
hosts = repo.GetHosts(config.GetNumberOfHosts(), config.ShouldForceIPv6())
|
||||
if len(hosts) == 0 {
|
||||
zurglog.Errorf("No reachable hosts found. Trying again in 5 minutes.")
|
||||
time.Sleep(5 * time.Minute)
|
||||
continue
|
||||
}
|
||||
zurglog.Debugf("Reachable hosts (%d): %v", len(hosts), hosts)
|
||||
break
|
||||
}
|
||||
}
|
||||
zurglog.Debugf("Reachable hosts (%d): %v", len(hosts), hosts)
|
||||
|
||||
apiClient := http.NewHTTPClient(
|
||||
config.GetToken(),
|
||||
|
||||
Reference in New Issue
Block a user