Reuse a singleton HttpClient for proxying

This commit is contained in:
Ske
2019-12-23 00:29:04 +01:00
parent c70556f5f9
commit 05282fd167
3 changed files with 5 additions and 14 deletions

View File

@@ -96,6 +96,7 @@ namespace PluralKit.Bot
// LogLevel = LogSeverity.Debug // We filter log levels in Serilog, so just pass everything through (Debug is lower than Verbose)
}))
.AddSingleton<Bot>()
.AddSingleton(_ => new HttpClient { Timeout = TimeSpan.FromSeconds(5) })
.AddTransient<CommandTree>()
.AddTransient<SystemCommands>()