Return 1 if eepget transfer fails (fixes #576)

This commit is contained in:
kytv
2012-01-06 03:07:25 +00:00
parent cc16834455
commit c155c4b601
5 changed files with 11 additions and 4 deletions

View File

@ -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) {

View File

@ -92,6 +92,7 @@ public class EepHead extends EepGet {
System.err.println("Etag: " + get.getETag());
} else {
System.err.println("Failed " + url);
System.exit(1);
}
}

View File

@ -83,6 +83,7 @@ public class PartialEepGet extends EepGet {
System.err.println("Etag: " + get.getETag());
} else {
System.err.println("Failed " + url);
System.exit(1);
}
}

View File

@ -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() {