From 27a215b451e28c78c37ff0a885ecba5bbe0edd81 Mon Sep 17 00:00:00 2001 From: Florian Lemaitre Date: Mon, 22 Jul 2024 10:48:10 +0200 Subject: [PATCH] Avoid service recreation --- Worker/src/DLLWorker/Program.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Worker/src/DLLWorker/Program.cs b/Worker/src/DLLWorker/Program.cs index eb7b5178..0a15ae1f 100644 --- a/Worker/src/DLLWorker/Program.cs +++ b/Worker/src/DLLWorker/Program.cs @@ -26,5 +26,9 @@ AppContext.SetSwitch("System.Net.SocketsHttpHandler.Http2FlowControl.DisableDynamicWindowSizing", true); -WorkerServer.Create(serviceConfigurator: collection => collection.AddSingleton()) +WorkerServer.Create(serviceConfigurator: collection => + { + collection.AddSingleton(); + collection.AddSingleton(); + }) .Run();