Skip to content

Commit

Permalink
fix error of scoped depdency being consumed by a singleton registered…
Browse files Browse the repository at this point in the history
… service (#139)
  • Loading branch information
runeanielsen authored Aug 20, 2024
1 parent d5129c5 commit 19b4ba9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OpenFTTH.APIGateway/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ public void ConfigureServices(IServiceCollection services)
// Utility network updated
services.AddHostedService<UtilityNetworkUpdatedEventConsumer>();

// Important that it is scoped, we want a new instance for each injection.
services.AddScoped<OpenFTTH.NotificationClient.Client>(x =>
// Important that it is transient, we want a new instance for each injection.
services.AddTransient<OpenFTTH.NotificationClient.Client>(x =>
{
var notificationServerSetting = Configuration
.GetSection("NotificationServer")
Expand Down

0 comments on commit 19b4ba9

Please sign in to comment.