Ensure metrics instance is a singleton

This commit is contained in:
Ske 2020-02-01 12:33:43 +01:00
parent 2abb9fc9f9
commit a60be64551

View File

@ -60,7 +60,7 @@ namespace PluralKit.Core
protected override void Load(ContainerBuilder builder)
{
builder.Register(c => InitMetrics(c.Resolve<CoreConfig>()))
.AsSelf().As<IMetrics>();
.AsSelf().As<IMetrics>().SingleInstance();
}
private IMetricsRoot InitMetrics(CoreConfig config)