fixed missing return error

This commit is contained in:
mrbesen 2020-08-27 13:33:40 +02:00
parent add7f5ece2
commit 9b6da7080b
Signed by: MrBesen
GPG Key ID: 596B2350DCD67504
1 changed files with 5 additions and 3 deletions

View File

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