Skip to content

Commit

Permalink
DatabasePlatform.wasFailureCommunicationBased() fix
Browse files Browse the repository at this point in the history
Signed-off-by: Radek Felcman <radek.felcman@oracle.com>
  • Loading branch information
rfelcman authored and lukasj committed Nov 27, 2023
1 parent 40308fe commit 3b5da43
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3224,7 +3224,7 @@ public boolean wasFailureCommunicationBased(SQLException exception, Connection c
// By default use the JDBC isValid API unless a ping SQL has been set.
// The ping SQL is set by most platforms, but user could set to null to used optimized JDBC check if desired.
try {
return connection.isValid(IS_VALID_TIMEOUT);
return !connection.isValid(IS_VALID_TIMEOUT);
} catch (Throwable failed) {
// Catch throwable as old JDBC drivers may not support isValid.
return false;
Expand Down

0 comments on commit 3b5da43

Please sign in to comment.