Skip to content

Commit 3df3bd3

Browse files
committed
Update RetryHandler options like delay and retryInterval
1 parent 6ef4465 commit 3df3bd3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/java/com/microsoft/graph/httpcore/RetryHandler.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class RetryHandler implements ServiceUnavailableRetryStrategy{
2626
* value is 1 second.
2727
*/
2828
private long retryInterval;
29-
private final int DELAY_SECONDS = 10;
29+
private final int DELAY_MILLISECONDS = 1000;
3030
private final String RETRY_AFTER = "Retry-After";
3131
private final String TRANSFER_ENCODING = "Transfer-Encoding";
3232

@@ -43,7 +43,7 @@ public RetryHandler(final int maxRetries, final int retryInterval) {
4343
}
4444

4545
public RetryHandler() {
46-
this(1, 1000);
46+
this(2, 1000);
4747
}
4848

4949
@Override
@@ -57,14 +57,13 @@ public boolean retryRequest(HttpResponse response, int executionCount, HttpConte
5757
if(header != null)
5858
retryInterval = Long.parseLong(header.getValue());
5959
else
60-
retryInterval = (long)Math.pow(2.0, (double)executionCount) * DELAY_SECONDS;
60+
retryInterval = (long)Math.pow(2.0, (double)executionCount) * DELAY_MILLISECONDS;
6161
}
6262
return shouldRetry;
6363
}
6464

6565
@Override
6666
public long getRetryInterval() {
67-
// TODO Auto-generated method stub
6867
return retryInterval;
6968
}
7069

0 commit comments

Comments
 (0)