Skip to content

Commit

Permalink
Added back changes for connection part of CRL, which only affect exis…
Browse files Browse the repository at this point in the history
…ting files. To allow for PR to be created.
  • Loading branch information
Jeffery-Wasty committed Sep 21, 2024
1 parent 3be298f commit 0296179
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2002,10 +2002,23 @@ Connection connect(Properties propsIn, SQLServerPooledConnection pooledConnectio
}
throw e;
} else {
// only retry if transient error
// Only retry if matches configured CRL rules, or transient error (if CRL is not in use)
SQLServerError sqlServerError = e.getSQLServerError();
if (!TransientError.isTransientError(sqlServerError)) {
if (null == sqlServerError) {
throw e;
} else {
ConfigRetryRule rule = ConfigurableRetryLogic.getInstance()
.searchRuleSet(sqlServerError.getErrorNumber(), "connection");

if (null == rule) {
if (ConfigurableRetryLogic.getInstance().getReplaceFlag()) {
throw e;
} else {
if (!TransientError.isTransientError(sqlServerError)) {
throw e;
}
}
}
}

// check if there's time to retry, no point to wait if no time left
Expand Down

0 comments on commit 0296179

Please sign in to comment.