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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sideband_port configuration return default if not present. #1135

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion source/server/server_configuration_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,12 @@ int ServerConfigurationParser::parse_max_message_size() const

int ServerConfigurationParser::parse_sideband_port() const
{
return parse_port_with_key(kSidebandPortJsonKey);
try {
return parse_port_with_key(kSidebandPortJsonKey);
}
catch (const UnspecifiedPortException&) {
return DEFAULT_SIDEBAND_PORT;
}
}

FeatureToggles ServerConfigurationParser::parse_feature_toggles() const
Expand Down
1 change: 1 addition & 0 deletions source/server/server_configuration_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ static const char* kInvalidFeatureToggleMessage = "Feature Toggles must be speci
static const char* kInvalidCodeReadinessMessage = "code_readiness must be a string in [Release, RestrictedRelease, NextRelease, RestrictedNextRelease, Incomplete, Prototype].\n\n";
static const char* kDefaultAddress = "[::]";
constexpr int UNLIMITED_MAX_MESSAGE_SIZE = -1;
constexpr int DEFAULT_SIDEBAND_PORT = 50055;

class ServerConfigurationParser {
public:
Expand Down
Loading