Skip to content

Commit bc1e34b

Browse files
authored
handle null (#1135)
Bypassing as this is blocking ATS runs. Simple fix to make sideband_port optional config.
1 parent 5bab627 commit bc1e34b

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

source/server/server_configuration_parser.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,12 @@ int ServerConfigurationParser::parse_max_message_size() const
144144

145145
int ServerConfigurationParser::parse_sideband_port() const
146146
{
147-
return parse_port_with_key(kSidebandPortJsonKey);
147+
try {
148+
return parse_port_with_key(kSidebandPortJsonKey);
149+
}
150+
catch (const UnspecifiedPortException&) {
151+
return DEFAULT_SIDEBAND_PORT;
152+
}
148153
}
149154

150155
FeatureToggles ServerConfigurationParser::parse_feature_toggles() const

source/server/server_configuration_parser.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ static const char* kInvalidFeatureToggleMessage = "Feature Toggles must be speci
2323
static const char* kInvalidCodeReadinessMessage = "code_readiness must be a string in [Release, RestrictedRelease, NextRelease, RestrictedNextRelease, Incomplete, Prototype].\n\n";
2424
static const char* kDefaultAddress = "[::]";
2525
constexpr int UNLIMITED_MAX_MESSAGE_SIZE = -1;
26+
constexpr int DEFAULT_SIDEBAND_PORT = 50055;
2627

2728
class ServerConfigurationParser {
2829
public:

0 commit comments

Comments
 (0)