Skip to content

Commit c01aa64

Browse files
committed
Directly call invalidateEnclaveSessionCache from reconnect
1 parent b83e896 commit c01aa64

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2193,14 +2193,7 @@ Connection connect(Properties propsIn, SQLServerPooledConnection pooledConnectio
21932193
// Any existing enclave session would be invalid, make sure it is invalidated.
21942194
// For example, if this is a session recovery reconnect.
21952195
//
2196-
2197-
if (enclaveProvider != null) {
2198-
if (connectionlogger.isLoggable(Level.FINE)) {
2199-
connectionlogger.fine("Invalidating existing enclave session for enclave provider : " + enclaveProvider);
2200-
}
2201-
enclaveProvider.invalidateEnclaveSession();
2202-
}
2203-
2196+
invalidateEnclaveSessionCache();
22042197
for (int connectRetryAttempt = 0, tlsRetryAttempt = 0;;) {
22052198
try {
22062199
if (0 == elapsedSeconds || elapsedSeconds < loginTimeoutSeconds) {

src/main/java/com/microsoft/sqlserver/jdbc/SQLServerException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public final class SQLServerException extends java.sql.SQLException {
8989
static final int DATA_CLASSIFICATION_NOT_EXPECTED = 11;
9090
static final int DATA_CLASSIFICATION_INVALID_LABEL_INDEX = 12;
9191
static final int DATA_CLASSIFICATION_INVALID_INFORMATION_TYPE_INDEX = 13;
92-
92+
9393
static final java.util.logging.Logger exLogger = java.util.logging.Logger
9494
.getLogger("com.microsoft.sqlserver.jdbc.internals.SQLServerException");
9595

0 commit comments

Comments
 (0)