Skip to content

Commit 5593190

Browse files
Copilotchrjohn
andauthored
Switch DTD retry delay to exponential backoff
Agent-Logs-Url: https://github.com/quickfix-j/quickfixj/sessions/bfbc9252-140b-44b9-a936-c3af5d32355e Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
1 parent 5553875 commit 5593190

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

quickfixj-core/src/test/java/quickfix/MessageTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ private DataDictionary loadDataDictionaryWithExternalDtdRetry() throws ConfigErr
12951295
lastError = e;
12961296
if (attempt < EXTERNAL_DTD_LOAD_RETRIES) {
12971297
try {
1298-
Thread.sleep((long) attempt * EXTERNAL_DTD_RETRY_DELAY_MILLIS);
1298+
Thread.sleep((long) Math.pow(2, attempt - 1) * EXTERNAL_DTD_RETRY_DELAY_MILLIS);
12991299
} catch (InterruptedException interruptedException) {
13001300
Thread.currentThread().interrupt();
13011301
throw new ConfigError("Interrupted while retrying FIX_External_DTD.xml load", interruptedException);

0 commit comments

Comments
 (0)