Skip to content

Commit

Permalink
loginTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
lilgreenbird committed Nov 7, 2023
1 parent cc1edea commit 7f704c7
Showing 1 changed file with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -772,18 +772,6 @@ final int getSocketTimeoutMilliseconds() {
return socketTimeoutMilliseconds;
}

/** login timeout in seconds */
private int loginTimeoutSeconds;

/**
* Returns the loginTimeoutSeconds in seconds.
*
* @return
*/
final int getLoginTimeoutSeconds() {
return loginTimeoutSeconds;
}

/**
* boolean value for deciding if the driver should use bulk copy API for batch inserts.
*/
Expand Down Expand Up @@ -1822,7 +1810,8 @@ Connection connect(Properties propsIn, SQLServerPooledConnection pooledConnectio
if (propsIn != null) {
activeConnectionProperties = (Properties) propsIn.clone();
}
loginTimeoutSeconds = validateTimeout(SQLServerDriverIntProperty.LOGIN_TIMEOUT);

int loginTimeoutSeconds = validateTimeout(SQLServerDriverIntProperty.LOGIN_TIMEOUT);

// Interactive auth may involve MFA which require longer timeout
if (SqlAuthentication.ACTIVE_DIRECTORY_INTERACTIVE.toString().equalsIgnoreCase(authenticationString)) {
Expand Down Expand Up @@ -2001,6 +1990,8 @@ Connection connectInternal(Properties propsIn,
sPropValue = activeConnectionProperties.getProperty(sPropKey);
validateMaxSQLLoginName(sPropKey, sPropValue);

int loginTimeoutSeconds = validateTimeout(SQLServerDriverIntProperty.LOGIN_TIMEOUT);

// Translates the serverName from Unicode to ASCII Compatible Encoding (ACE), as defined by the ToASCII
// operation of RFC 3490.
sPropKey = SQLServerDriverBooleanProperty.SERVER_NAME_AS_ACE.toString();
Expand Down

0 comments on commit 7f704c7

Please sign in to comment.