kopia lustrzana https://github.com/onthegomap/planetiler
do a sleep on all IOException (not just GOAWAY) + no need to catch InterruptedException
rodzic
f8679b26b8
commit
01dec42302
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue