Skip to content

Commit

Permalink
Fix Vertica Connection Factory connection test, prevented from creati…
Browse files Browse the repository at this point in the history
…ng new connection after previous one closed (#1573)
  • Loading branch information
akuzin1 authored Feb 2, 2024
1 parent 3b8e16e commit 4115400
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ public synchronized Connection getOrCreateConn(String connStr) {
*/
private boolean connectionTest(Connection conn) throws SQLException {
try {
conn.isValid(CONNECTION_TIMEOUT);
return true;
return conn.isValid(CONNECTION_TIMEOUT);
}
catch (RuntimeException | SQLException ex) {
logger.warn("getOrCreateConn: Exception while testing existing connection.", ex);
Expand Down

0 comments on commit 4115400

Please sign in to comment.