mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Fix postgres execWithRetry
This commit is contained in:
parent
41ba0118b5
commit
cc16854c04
@ -30,7 +30,7 @@ void Connection::execWithRetry(const std::function<void(pqxx::nontransaction &)>
|
||||
LOG_DEBUG(log, "Cannot execute query due to connection failure, attempt: {}/{}. (Message: {})",
|
||||
try_no, num_tries, e.what());
|
||||
|
||||
if (try_no == num_tries)
|
||||
if (try_no + 1 == num_tries)
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user