diff --git a/src/Tgstation.Server.Host/Swarm/SwarmRegistrationRequest.cs b/src/Tgstation.Server.Host/Swarm/SwarmRegistrationRequest.cs
index 93f5ed92db..229d4d28d2 100644
--- a/src/Tgstation.Server.Host/Swarm/SwarmRegistrationRequest.cs
+++ b/src/Tgstation.Server.Host/Swarm/SwarmRegistrationRequest.cs
@@ -3,8 +3,6 @@ using System.ComponentModel.DataAnnotations;
using Tgstation.Server.Api.Models.Internal;
-#nullable disable
-
namespace Tgstation.Server.Host.Swarm
{
///
@@ -16,6 +14,15 @@ namespace Tgstation.Server.Host.Swarm
/// The TGS of the sending server.
///
[Required]
- public Version ServerVersion { get; set; }
+ public Version ServerVersion { get; }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The value of .
+ public SwarmRegistrationRequest(Version serverVersion)
+ {
+ ServerVersion = serverVersion ?? throw new ArgumentNullException(nameof(serverVersion));
+ }
}
}
diff --git a/src/Tgstation.Server.Host/Swarm/SwarmService.cs b/src/Tgstation.Server.Host/Swarm/SwarmService.cs
index cd0e855151..0ff0131c72 100644
--- a/src/Tgstation.Server.Host/Swarm/SwarmService.cs
+++ b/src/Tgstation.Server.Host/Swarm/SwarmService.cs
@@ -1267,9 +1267,8 @@ namespace Tgstation.Server.Host.Swarm
null,
HttpMethod.Post,
SwarmConstants.RegisterRoute,
- new SwarmRegistrationRequest
+ new SwarmRegistrationRequest(assemblyInformationProvider.Version)
{
- ServerVersion = assemblyInformationProvider.Version,
Identifier = swarmConfiguration.Identifier,
Address = swarmConfiguration.Address,
PublicAddress = swarmConfiguration.PublicAddress,