diff --git a/arangod/Agency/AgencyComm.cpp b/arangod/Agency/AgencyComm.cpp index 19a0f06f37..ecaf9b33ed 100644 --- a/arangod/Agency/AgencyComm.cpp +++ b/arangod/Agency/AgencyComm.cpp @@ -1219,9 +1219,9 @@ AgencyCommResult AgencyComm::sendWithFailover( // in this case we have to pick it up and use the new location returned if (result._statusCode == (int)arangodb::rest::ResponseCode::TEMPORARY_REDIRECT) { - std::string red = AgencyCommManager::MANAGER->redirect( + endpoint = AgencyCommManager::MANAGER->redirect( std::move(connection), endpoint, result._location, url); - connection = AgencyCommManager::MANAGER->acquire(red); + connection = AgencyCommManager::MANAGER->acquire(endpoint); continue; }