mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-14 17:50:13 +00:00
Ensure metrics instance is a singleton
This commit is contained in:
parent
2abb9fc9f9
commit
a60be64551
1 changed files with 1 additions and 1 deletions
|
|
@ -60,7 +60,7 @@ namespace PluralKit.Core
|
||||||
protected override void Load(ContainerBuilder builder)
|
protected override void Load(ContainerBuilder builder)
|
||||||
{
|
{
|
||||||
builder.Register(c => InitMetrics(c.Resolve<CoreConfig>()))
|
builder.Register(c => InitMetrics(c.Resolve<CoreConfig>()))
|
||||||
.AsSelf().As<IMetrics>();
|
.AsSelf().As<IMetrics>().SingleInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
private IMetricsRoot InitMetrics(CoreConfig config)
|
private IMetricsRoot InitMetrics(CoreConfig config)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue