Skip to content

Commit

Permalink
Avoid service recreation
Browse files Browse the repository at this point in the history
  • Loading branch information
lemaitre-aneo committed Jul 22, 2024
1 parent 955bddd commit 27a215b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Worker/src/DLLWorker/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@
AppContext.SetSwitch("System.Net.SocketsHttpHandler.Http2FlowControl.DisableDynamicWindowSizing",
true);

WorkerServer.Create<ComputerService>(serviceConfigurator: collection => collection.AddSingleton<ServiceRequestContext>())
WorkerServer.Create<ComputerService>(serviceConfigurator: collection =>
{
collection.AddSingleton<ComputerService>();
collection.AddSingleton<ServiceRequestContext>();
})
.Run();

0 comments on commit 27a215b

Please sign in to comment.