mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 00:22:40 +01:00
Add a 5 second delay between swarm registration attempts
This commit is contained in:
@@ -565,6 +565,9 @@ namespace Tgstation.Server.Host.Components
|
||||
|
||||
if (registrationResult == SwarmRegistrationResult.VersionMismatch)
|
||||
throw new InvalidOperationException("Swarm controller's TGS version does not match our own!");
|
||||
|
||||
if (registrationResult != SwarmRegistrationResult.Success)
|
||||
await asyncDelayer.Delay(TimeSpan.FromSeconds(5), cancellationToken);
|
||||
}
|
||||
while (registrationResult != SwarmRegistrationResult.Success && !cancellationToken.IsCancellationRequested);
|
||||
}
|
||||
|
||||
@@ -821,6 +821,8 @@ namespace Tgstation.Server.Host.Swarm
|
||||
logger.LogError("Swarm re-registration failed, controller's TGS version has changed!");
|
||||
break;
|
||||
}
|
||||
|
||||
await asyncDelayer.Delay(TimeSpan.FromSeconds(5), cancellationToken);
|
||||
}
|
||||
|
||||
// we could do something here... but what?
|
||||
|
||||
Reference in New Issue
Block a user