Skip to content

Commit

Permalink
DatabasePlatform.wasFailureCommunicationBased() fix (#2229)
Browse files Browse the repository at this point in the history
Signed-off-by: Radek Felcman <[email protected]>
(cherry picked from commit 3b5da43)
  • Loading branch information
rfelcman committed Aug 8, 2024
1 parent ededbb5 commit ef4f334
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3205,7 +3205,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 ef4f334

Please sign in to comment.