fixed missing return error
This commit is contained in:
parent
add7f5ece2
commit
9b6da7080b
|
@ -167,8 +167,7 @@ public class TelegramAPI implements Runnable {
|
|||
|
||||
//catch 429 too many error
|
||||
if (response == 429) {
|
||||
toomany = true;
|
||||
if(trycount > 10) break;
|
||||
if(trycount < 10) toomany = true;
|
||||
|
||||
//try to read timeout
|
||||
//too Many Requests: retry after 19
|
||||
|
@ -182,13 +181,16 @@ public class TelegramAPI implements Runnable {
|
|||
System.out.println("Got 429 -> sleep for " + timeout + " seconds");
|
||||
Thread.sleep(timeout * 1000);
|
||||
} catch(InterruptedException e) {}
|
||||
continue;
|
||||
|
||||
if(trycount < 10) continue;
|
||||
}
|
||||
|
||||
throw new APIError(parameter, request, con.getResponseCode(), null, errdesc);
|
||||
//throw new IOException("API request returned HTTP " + con.getResponseCode() + " (" + con.getResponseMessage() + ") for action " + request + "\nurl: " + url.toString() + "\nparams: " + parameter + "\nerror description: " + errdesc);
|
||||
}
|
||||
}
|
||||
//unreachable code?
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
protected String readfromIS(InputStream is) {
|
||||
|
|
Loading…
Reference in New Issue