@@ -39,6 +39,7 @@ public class SearchImageService {
|
||||
.followRedirects(true)
|
||||
.followSslRedirects(true)
|
||||
.retryOnConnectionFailure(true)
|
||||
.connectionPool(new ConnectionPool(0, 1, TimeUnit.NANOSECONDS))
|
||||
.build();
|
||||
|
||||
this.objectMapper = new ObjectMapper();
|
||||
@@ -149,7 +150,7 @@ public class SearchImageService {
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(500L * attempt); // 500ms, 1000ms, 1500ms
|
||||
Thread.sleep(500L * attempt);
|
||||
} catch (InterruptedException ie) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new IOException("Retry interrupted", ie);
|
||||
|
||||
Reference in New Issue
Block a user