Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

willi #14847

Merged
merged 2 commits into from
Oct 1, 2021
Merged

willi #14847

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions arangosh/Shell/ClientFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,15 @@ void ClientFeature::validateOptions(std::shared_ptr<ProgramOptions> options) {
}

if (_endpoints.size() > _maxNumEndpoints) {
LOG_TOPIC("6e305", FATAL, arangodb::Logger::FIXME)
<< "Maximum number of endpoints exceeded";
FATAL_ERROR_EXIT();
// this is the case if we have more endpoints than allowed.
// in versions before 3.9, it was allowed to specify `--server.endpoint`
// multiple times, and if this was done, only the last provided endpoint
// was used. to keep backward-compatibility, we now emulate this
// behavior here.
TRI_ASSERT(_maxNumEndpoints == 1);
std::string selectedEndpoint = _endpoints.back();

_endpoints = { std::move(selectedEndpoint) };
}

// if a username is specified explicitly, assume authentication is desired
Expand Down