Skip to content

Commit 4c996dc

Browse files
revert grpcChannel pool
1 parent 3b0b791 commit 4c996dc

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/Ydb.Sdk/src/Pool/ChannelPool.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using System.Security.Cryptography.X509Certificates;
55
using Grpc.Core;
66
using Grpc.Net.Client;
7-
using Grpc.Net.Client.Configuration;
87
using Microsoft.Extensions.Logging;
98

109
namespace Ydb.Sdk.Pool;
@@ -98,11 +97,7 @@ public GrpcChannel CreateChannel(string endpoint)
9897
LoggerFactory = _loggerFactory,
9998
DisposeHttpClient = true,
10099
MaxSendMessageSize = _config.MaxSendMessageSize,
101-
MaxReceiveMessageSize = _config.MaxReceiveMessageSize,
102-
ServiceConfig = new ServiceConfig
103-
{
104-
LoadBalancingConfigs = { new RoundRobinConfig() }
105-
}
100+
MaxReceiveMessageSize = _config.MaxReceiveMessageSize
106101
};
107102

108103
var httpHandler = new SocketsHttpHandler
@@ -115,13 +110,13 @@ public GrpcChannel CreateChannel(string endpoint)
115110
};
116111

117112
// https://github.com/grpc/grpc-dotnet/issues/2312#issuecomment-1790661801
118-
// httpHandler.Properties["__GrpcLoadBalancingDisabled"] = true;
113+
httpHandler.Properties["__GrpcLoadBalancingDisabled"] = true;
119114

120115
channelOptions.HttpHandler = httpHandler;
121116

122117
if (ServerCertificates.Count == 0)
123118
{
124-
return GrpcChannel.ForAddress(new Uri(endpoint) { }, channelOptions);
119+
return GrpcChannel.ForAddress(endpoint, channelOptions);
125120
}
126121

127122
httpHandler.SslOptions.RemoteCertificateValidationCallback +=

0 commit comments

Comments
 (0)