Fix #269 Guard against drivers that construct an SQLException where the 'cause' is self-referential. Hopefully the cycle is not multi-layers deep, because this check will only guard against one "loop".

pull/272/head
Brett Wooldridge 10 years ago
parent 953a5de33c
commit a310df95d7

@ -109,7 +109,7 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
LOGGER.warn(String.format("Connection %s (%s) marked as broken because of SQLSTATE(%s), ErrorCode(%d).", delegate.toString(),
parentPool.toString(), sqlState, sqle.getErrorCode()), sqle);
}
else if (sqle.getNextException() instanceof SQLException) {
else if (sqle.getNextException() instanceof SQLException && sqle != sqle.getNextException()) {
checkException(sqle.getNextException());
}
}

Loading…
Cancel
Save