Skip to content

Commit

Permalink
Setting the loginTimout to default in case of a zero value (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulvii authored Aug 28, 2017
1 parent 490c169 commit bad7829
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,10 @@ Connection connect(Properties propsIn,
// timeout, default is 15 per spec
String sPropValue = propsIn.getProperty(SQLServerDriverIntProperty.LOGIN_TIMEOUT.toString());
if (null != sPropValue && sPropValue.length() > 0) {
loginTimeoutSeconds = Integer.parseInt(sPropValue);
int sPropValueInt = Integer.parseInt(sPropValue);
if (0 != sPropValueInt) { // Use the default timeout in case of a zero value
loginTimeoutSeconds = sPropValueInt;
}
}
}

Expand Down

0 comments on commit bad7829

Please sign in to comment.