allow multiple http2 connections in grpc

This commit is contained in:
Stanley Dimant
2022-09-13 00:12:23 +02:00
parent ea48fb3947
commit 8c6cbc5983

View File

@@ -19,6 +19,7 @@ using Grpc.Net.Client.Configuration;
using Prometheus; using Prometheus;
using MareSynchronosShared.Metrics; using MareSynchronosShared.Metrics;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net.Http;
namespace MareSynchronosServer namespace MareSynchronosServer
{ {
@@ -82,6 +83,10 @@ namespace MareSynchronosServer
}).ConfigureChannel(c => }).ConfigureChannel(c =>
{ {
c.ServiceConfig = new ServiceConfig { MethodConfigs = { defaultMethodConfig } }; c.ServiceConfig = new ServiceConfig { MethodConfigs = { defaultMethodConfig } };
c.HttpHandler = new SocketsHttpHandler()
{
EnableMultipleHttp2Connections = true
};
}); });
services.AddGrpcClient<FileService.FileServiceClient>(c => services.AddGrpcClient<FileService.FileServiceClient>(c =>
{ {