Skip to content

Commit

Permalink
handle null (#1135)
Browse files Browse the repository at this point in the history
Bypassing as this is blocking ATS runs. Simple fix to make sideband_port optional config.
  • Loading branch information
amehra-ni authored Dec 3, 2024
1 parent 5bab627 commit bc1e34b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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

0 comments on commit bc1e34b

Please sign in to comment.