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

View File

@ -1,10 +1,13 @@
2012-01-06 kytv
* EepGet: If transfer fails, exit with status 1 (fixes #576)
* 2012-01-06 0.8.12 released
2012-01-04 kytv
* Update geoip.txt based on Maxmind GeoLite Country database from 2011-12-08
* Update geoip.txt based on Maxmind GeoLite Country database from 2011-12-08
2012-01-02 kytv
* Wrapper 3.5.13 for everything other than armv7.
* Wrapper 3.5.13 for everything other than armv7.
2012-01-02 zzz
* Fix webapp PortMapper lookup for SSL-only console