From b2d282d4120bf76f0c16205906f50722623400d8 Mon Sep 17 00:00:00 2001 From: RaidMax Date: Fri, 27 Nov 2020 22:08:13 -0600 Subject: [PATCH] include ; for timeout string --- Application/Extensions/StartupExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Extensions/StartupExtensions.cs b/Application/Extensions/StartupExtensions.cs index 1994983cc..6dd69cd70 100644 --- a/Application/Extensions/StartupExtensions.cs +++ b/Application/Extensions/StartupExtensions.cs @@ -74,14 +74,14 @@ namespace IW4MAdmin.Application.Extensions StringComparison.InvariantCultureIgnoreCase); services.AddDbContext(options => options.UseMySql( - appConfig.ConnectionString + (appendTimeout ? "default command timeout=0" : ""), + appConfig.ConnectionString + (appendTimeout ? ";default command timeout=0" : ""), mysqlOptions => mysqlOptions.EnableRetryOnFailure()), ServiceLifetime.Transient); break; case "postgresql": appendTimeout = !appConfig.ConnectionString.Contains("Command Timeout", StringComparison.InvariantCultureIgnoreCase); services.AddDbContext(options => - options.UseNpgsql(appConfig.ConnectionString + (appendTimeout ? "Command Timeout=0" : ""), + options.UseNpgsql(appConfig.ConnectionString + (appendTimeout ? ";Command Timeout=0" : ""), postgresqlOptions => postgresqlOptions.EnableRetryOnFailure()), ServiceLifetime.Transient); break; }