I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 935a5b57 authored by zzz's avatar zzz
Browse files

Reseed: Better error message if no valid URLs for configuration

parent 8c2636aa
No related branches found
No related tags found
No related merge requests found
......@@ -293,10 +293,11 @@ public class Reseeder {
_checker.setError(ngettext("Reseed fetched only 1 router.",
"Reseed fetched only {0} routers.", total));
} else {
System.out.println("Reseed failed, check network connection");
System.out.println(
"Ensure that nothing blocks outbound HTTP, check the logs, " +
"and if nothing helps, read the FAQ about reseeding manually.");
if (total == 0) {
System.out.println("Reseed failed, check network connection");
System.out.println("Ensure that nothing blocks outbound HTTP or HTTPS, check the logs, " +
"and if nothing helps, read the FAQ about reseeding manually.");
} // else < 0, no valid URLs
String old = _checker.getError();
_checker.setError(_("Reseed failed.") + ' ' +
_("See {0} for help.",
......@@ -396,7 +397,7 @@ public class Reseeder {
* - Otherwise just the http randomly.
*
* @param echoStatus apparently always false
* @return count of routerinfos successfully fetched
* @return count of routerinfos successfully fetched, or -1 if no valid URLs
*/
private int reseed(boolean echoStatus) {
List<URL> URLList = new ArrayList<URL>();
......@@ -467,6 +468,11 @@ public class Reseeder {
URLList.addAll(nonSSLList);
}
}
if (URLList.isEmpty()) {
System.out.println("No valid reseed URLs");
_checker.setError("No valid reseed URLs");
return -1;
}
return reseed(URLList, echoStatus);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment