Skip to content

Commit

Permalink
always set default max message size for now
Browse files Browse the repository at this point in the history
  • Loading branch information
anitarua committed Feb 28, 2024
1 parent 46bc475 commit 9120504
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Momento.Sdk/Internal/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ public static GrpcChannelOptions GrpcChannelOptionsFromGrpcConfig(IGrpcConfigura
var channelOptions = grpcConfig?.GrpcChannelOptions ?? new GrpcChannelOptions();
channelOptions.Credentials = ChannelCredentials.SecureSsl;
channelOptions.LoggerFactory ??= loggerFactory;
channelOptions.MaxReceiveMessageSize ??= DEFAULT_MAX_MESSAGE_SIZE;
channelOptions.MaxSendMessageSize ??= DEFAULT_MAX_MESSAGE_SIZE;
// TODO: how to know if user set the value or if max receive size is just set to the default 4mb or null, respectively?
// Currently just overwriting to 5mb
channelOptions.MaxReceiveMessageSize = DEFAULT_MAX_MESSAGE_SIZE;
channelOptions.MaxSendMessageSize = DEFAULT_MAX_MESSAGE_SIZE;
#if NET5_0_OR_GREATER
channelOptions.HttpHandler = new System.Net.Http.SocketsHttpHandler
{
Expand Down

0 comments on commit 9120504

Please sign in to comment.