Skip to content

Commit df50de5

Browse files
committed
Merged PR 683266: Allow gRPC IPC server to receive arbitrarily large messages
We already have an analogous setting on the client side, but the server had a limit of 4MB
1 parent 7453706 commit df50de5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Public/Src/Utilities/Ipc.Providers/Impl.GrpcBasedIpc/GrpcIpcServer.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public GrpcIpcServer(int port, IServerConfig config)
4646
public override async Task<Grpc.IpcResult> Message(Grpc.IpcOperation request, ServerCallContext context)
4747
{
4848
var ipcOperation = request.FromGrpc();
49-
49+
5050
ipcOperation.Timestamp.Daemon_AfterReceivedTime = DateTime.UtcNow;
5151
var operationId = Interlocked.Increment(ref m_lastOperationId);
5252

@@ -137,7 +137,13 @@ void IServer.Start(IIpcOperationExecutor executor)
137137
m_executor = executor;
138138
var serviceDefinition = IpcServer.BindService(this);
139139

140-
m_server = new Server()
140+
var channelOptions = new ChannelOption[]
141+
{
142+
new ChannelOption(ChannelOptions.MaxSendMessageLength, -1), // -1 == unbounded
143+
new ChannelOption(ChannelOptions.MaxReceiveMessageLength, -1)
144+
};
145+
146+
m_server = new Server(channelOptions)
141147
{
142148
Services = { serviceDefinition },
143149
Ports = { new ServerPort(IPAddress.Loopback.ToString(), m_port, ServerCredentials.Insecure) },

0 commit comments

Comments
 (0)