check for null or empty on secondary server var
This commit is contained in:
@@ -51,7 +51,7 @@ public class SystemInfoService : IHostedService, IDisposable
|
|||||||
|
|
||||||
|
|
||||||
var secondaryServer = Environment.GetEnvironmentVariable("SECONDARY_SERVER");
|
var secondaryServer = Environment.GetEnvironmentVariable("SECONDARY_SERVER");
|
||||||
if (secondaryServer == "0")
|
if (string.IsNullOrEmpty(secondaryServer) || secondaryServer == "0")
|
||||||
{
|
{
|
||||||
using var scope = _services.CreateScope();
|
using var scope = _services.CreateScope();
|
||||||
using var db = scope.ServiceProvider.GetService<MareDbContext>()!;
|
using var db = scope.ServiceProvider.GetService<MareDbContext>()!;
|
||||||
|
|||||||
Reference in New Issue
Block a user