forked from I2P_Developers/i2p.i2p
Reseed: Better error message if no valid URLs for configuration
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user