mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-07 21:58:06 -05:00
include ; for timeout string
This commit is contained in:
parent
e0ef55a636
commit
9ed3e50a63
@ -74,14 +74,14 @@ namespace IW4MAdmin.Application.Extensions
|
||||
StringComparison.InvariantCultureIgnoreCase);
|
||||
services.AddDbContext<DatabaseContext, MySqlDatabaseContext>(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<DatabaseContext, PostgresqlDatabaseContext>(options =>
|
||||
options.UseNpgsql(appConfig.ConnectionString + (appendTimeout ? "Command Timeout=0" : ""),
|
||||
options.UseNpgsql(appConfig.ConnectionString + (appendTimeout ? ";Command Timeout=0" : ""),
|
||||
postgresqlOptions => postgresqlOptions.EnableRetryOnFailure()), ServiceLifetime.Transient);
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user