forked from I2P_Developers/i2p.i2p
Return 1 if eepget transfer fails (fixes #576)
This commit is contained in:
@ -220,7 +220,8 @@ public class EepGet {
|
||||
if (username != null && password != null)
|
||||
get.addAuthorization(username, password);
|
||||
get.addStatusListener(get.new CLIStatusListener(markSize, lineLen));
|
||||
get.fetch(CONNECT_TIMEOUT, -1, inactivityTimeout);
|
||||
if (!get.fetch(CONNECT_TIMEOUT, -1, inactivityTimeout))
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
public static String suggestName(String url) {
|
||||
|
@ -92,6 +92,7 @@ public class EepHead extends EepGet {
|
||||
System.err.println("Etag: " + get.getETag());
|
||||
} else {
|
||||
System.err.println("Failed " + url);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,6 +83,7 @@ public class PartialEepGet extends EepGet {
|
||||
System.err.println("Etag: " + get.getETag());
|
||||
} else {
|
||||
System.err.println("Failed " + url);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,8 @@ public class SSLEepGet extends EepGet {
|
||||
get._saveCerts = true;
|
||||
get._commandLine = true;
|
||||
get.addStatusListener(get.new CLIStatusListener(1024, 40));
|
||||
get.fetch(45*1000, -1, 60*1000);
|
||||
if(!get.fetch(45*1000, -1, 60*1000))
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
private static void usage() {
|
||||
|
Reference in New Issue
Block a user