1
0
Fork 0

AgencyComm evaluates fully sent requests properly.

This commit is contained in:
Kaveh Vahedipour 2017-01-24 09:17:15 +01:00
parent f45d775106
commit 344bcd8ea6
1 changed files with 3 additions and 4 deletions

View File

@ -1313,7 +1313,7 @@ AgencyCommResult AgencyComm::sendWithFailover(
double conTimeout = 1.0;
int tries = 0;
int lastStatusCode = 0;
while (true) { // will be left by timeout eventually
// Raise waits to a maximum 10 seconds
@ -1366,8 +1366,6 @@ AgencyCommResult AgencyComm::sendWithFailover(
continue;
}
lastStatusCode = result._statusCode;
// got a result, we are done
if (result.successful()) {
AgencyCommManager::MANAGER->release(std::move(connection), endpoint);
@ -1395,8 +1393,9 @@ AgencyCommResult AgencyComm::sendWithFailover(
if (inq.successful()) {
auto bodyBuilder = VPackParser::fromJson(inq._body);
auto const& outer = bodyBuilder->slice();
bool success = false;
if (outer.isArray() && outer.length() > 0) {
bool success = false;
for (auto const& inner : VPackArrayIterator(outer)) {
if (inner.isArray() && inner.length() > 0) {
for (auto const& i : VPackArrayIterator(inner)) {