Skip to content

Commit 02d70ea

Browse files
committed
Remove intermediate 429 response close from retry loop
This fix belongs in a separate PR since it's independent of the configurable max backoff feature.
1 parent 9c2c8d5 commit 02d70ea

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

  • duo-client/src/main/java/com/duosecurity/client

duo-client/src/main/java/com/duosecurity/client/Http.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,6 @@ private Response executeRequest(Request request) throws Exception {
319319
return response;
320320
}
321321

322-
// Close the 429 response to release the connection back to the pool before retrying
323-
if (response.body() != null) {
324-
response.close();
325-
}
326322
sleep(backoffMs + nextRandomInt(1000));
327323
backoffMs *= BACKOFF_FACTOR;
328324
}

0 commit comments

Comments
 (0)