mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-23 21:16:52 +01:00
Nullify SwarmUpdateOperation
This commit is contained in:
@@ -6,8 +6,6 @@ using System.Threading.Tasks;
|
||||
using Tgstation.Server.Api.Models.Internal;
|
||||
using Tgstation.Server.Api.Models.Response;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Tgstation.Server.Host.Swarm
|
||||
{
|
||||
/// <summary>
|
||||
@@ -33,7 +31,7 @@ namespace Tgstation.Server.Host.Swarm
|
||||
/// <summary>
|
||||
/// Backing field for <see cref="InvolvedServers"/>.
|
||||
/// </summary>
|
||||
readonly IReadOnlyList<SwarmServerResponse> initialInvolvedServers;
|
||||
readonly IReadOnlyList<SwarmServerResponse>? initialInvolvedServers;
|
||||
|
||||
/// <summary>
|
||||
/// The backing <see cref="TaskCompletionSource{TResult}"/> for <see cref="CommitGate"/>.
|
||||
@@ -43,7 +41,7 @@ namespace Tgstation.Server.Host.Swarm
|
||||
/// <summary>
|
||||
/// <see cref="HashSet{T}"/> of <see cref="SwarmServer.Identifier"/> that need to send a ready-commit to the controller before the commit can happen.
|
||||
/// </summary>
|
||||
readonly HashSet<string> nodesThatNeedToBeReadyToCommit;
|
||||
readonly HashSet<string>? nodesThatNeedToBeReadyToCommit;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SwarmUpdateOperation"/> class.
|
||||
@@ -68,7 +66,7 @@ namespace Tgstation.Server.Host.Swarm
|
||||
initialInvolvedServers = currentNodes?.ToList() ?? throw new ArgumentNullException(nameof(currentNodes));
|
||||
nodesThatNeedToBeReadyToCommit = initialInvolvedServers
|
||||
.Where(node => !node.Controller)
|
||||
.Select(node => node.Identifier)
|
||||
.Select(node => node.Identifier!)
|
||||
.ToHashSet();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user