Skip to content

Commit

Permalink
Fixed NPE in debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
ok2c committed Dec 10, 2023
1 parent 6ad6b82 commit 9e3d79b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,11 @@ public void release(final ConnectionEndpoint endpoint, final Object state, final
}
} else {
if (LOG.isDebugEnabled()) {
LOG.debug("{} connection is not kept alive(isConsistent:{})", ConnPoolSupport.getId(endpoint), conn.isConsistent());
if (conn != null && !conn.isConsistent()) {
LOG.debug("{} connection is in an inconsistent state and cannot be kept alive)", ConnPoolSupport.getId(endpoint));
} else {
LOG.debug("{} connection is not kept alive)", ConnPoolSupport.getId(endpoint));
}
}
}
} catch (final RuntimeException ex) {
Expand Down

0 comments on commit 9e3d79b

Please sign in to comment.