mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 18:47:23 +01:00
check for null or empty on secondary server var
This commit is contained in:
parent
2f52d0ba59
commit
ea48fb3947
1 changed files with 1 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ public class SystemInfoService : IHostedService, IDisposable
|
|||
|
||||
|
||||
var secondaryServer = Environment.GetEnvironmentVariable("SECONDARY_SERVER");
|
||||
if (secondaryServer == "0")
|
||||
if (string.IsNullOrEmpty(secondaryServer) || secondaryServer == "0")
|
||||
{
|
||||
using var scope = _services.CreateScope();
|
||||
using var db = scope.ServiceProvider.GetService<MareDbContext>()!;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue