Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions src/Ydb.Sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Shutdown channels which are removed from the EndpointPool after discovery calls.
- Fixed bug: Received message exceeds the maximum configured message size (#421).
- Added `MaxSendMessageSize` \ `MaxReceiveMessageSize` grpc message size settings.
- Added `EnableMultipleHttp2Connections` setting to grpc channel.
Expand Down
16 changes: 9 additions & 7 deletions src/Ydb.Sdk/src/Driver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,15 @@ private async Task<Status> DiscoverEndpoints()
resultProto.Endpoints.Count, resultProto.SelfLocation, Config.SdkVersion
);

_endpointPool.Reset(resultProto.Endpoints
.Select(endpointSettings => new EndpointSettings(
(int)endpointSettings.NodeId,
(endpointSettings.Ssl ? "https://" : "http://") +
endpointSettings.Address + ":" + endpointSettings.Port,
endpointSettings.Location))
.ToImmutableArray()
await _channelPool.RemoveChannels(
_endpointPool.Reset(resultProto.Endpoints
.Select(endpointSettings => new EndpointSettings(
(int)endpointSettings.NodeId,
(endpointSettings.Ssl ? "https://" : "http://") +
endpointSettings.Address + ":" + endpointSettings.Port,
endpointSettings.Location))
.ToImmutableArray()
)
);

return new Status(StatusCode.Success);
Expand Down
Loading