do a sleep on all IOException (not just GOAWAY) + no need to catch InterruptedException

pull/818/head
Peter Hanecak 2024-02-16 13:30:29 +01:00
rodzic f8679b26b8
commit 01dec42302
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 8DFCA0FEBE229DE2
1 zmienionych plików z 1 dodań i 8 usunięć

Wyświetl plik

@ -317,14 +317,7 @@ public class Wikidata {
LOGGER.error("sparql query failed, exhausted retries: " + e);
throw e;
}
if (e.getMessage() != null && e.getMessage().contains("GOAWAY")) {
try {
LOGGER.debug("GOAWAY received, waiting {} ms to give server some room", config.httpRetryWait());
Thread.sleep(config.httpRetryWait());
} catch (InterruptedException e2) {
Thread.currentThread().interrupt();
}
}
Thread.sleep(config.httpRetryWait());
}
}