Skip to content

Commit 5199bc6

Browse files
authored
24-3-13-hotfix: Add fallback to ssl port on ydb driver init (#12006)
1 parent a2d636e commit 5199bc6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ydb/core/driver_lib/run/run.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,8 +1385,14 @@ void TKikimrRunner::InitializeActorSystem(
13851385
}
13861386

13871387
if (runConfig.AppConfig.HasGRpcConfig()) {
1388-
if (const ui32 grpcPort = runConfig.AppConfig.GetGRpcConfig().GetPort()) {
1389-
auto driverConfig = NYdb::TDriverConfig().SetEndpoint(TStringBuilder() << "localhost:" << grpcPort);
1388+
ui32 port = runConfig.AppConfig.GetGRpcConfig().GetPort();
1389+
1390+
if (!port) {
1391+
port = runConfig.AppConfig.GetGRpcConfig().GetSslPort();
1392+
}
1393+
1394+
if (port) {
1395+
auto driverConfig = NYdb::TDriverConfig().SetEndpoint(TStringBuilder() << "localhost:" << port);
13901396
YdbDriver.Reset(new NYdb::TDriver(driverConfig));
13911397
AppData->YdbDriver = YdbDriver.Get();
13921398
}

0 commit comments

Comments
 (0)