diff --git a/build/Version.props b/build/Version.props index 908457bd86..d5f7aa6fd7 100644 --- a/build/Version.props +++ b/build/Version.props @@ -6,7 +6,7 @@ 6.11.1 5.3.0 10.10.0 - 0.3.0 + 0.4.0 7.0.0 16.1.0 19.1.0 diff --git a/src/Tgstation.Server.Host/GraphQL/Types/UpdateInformation.cs b/src/Tgstation.Server.Host/GraphQL/Types/UpdateInformation.cs index 27e758bd79..937e07b69a 100644 --- a/src/Tgstation.Server.Host/GraphQL/Types/UpdateInformation.cs +++ b/src/Tgstation.Server.Host/GraphQL/Types/UpdateInformation.cs @@ -58,7 +58,7 @@ public bool UpdateInProgress( /// The for the operation. /// The of the GitHub repository updates are sourced from on success. if a GitHub API error occurred. public async ValueTask TrackedRepositoryUrl( - bool forceFresh, + bool? forceFresh, [Service] IGraphQLAuthorityInvoker administrationAuthority, CancellationToken cancellationToken) => (await GetAdministrationResponseSafe(forceFresh, administrationAuthority, cancellationToken)).TrackedRepositoryUrl; @@ -82,7 +82,7 @@ public bool UpdateInProgress( /// The for the operation. /// The of the latest TGS version on success. if a GitHub API error occurred. public async ValueTask LatestVersion( - bool forceFresh, + bool? forceFresh, [Service] IGraphQLAuthorityInvoker administrationAuthority, CancellationToken cancellationToken) => (await GetAdministrationResponseSafe(forceFresh, administrationAuthority, cancellationToken)).LatestVersion; @@ -95,20 +95,21 @@ public bool UpdateInProgress( /// The for the operation. /// A resulting in the from the . async ValueTask GetAdministrationResponseSafe( - bool forceFresh, + bool? forceFresh, IGraphQLAuthorityInvoker administrationAuthority, CancellationToken cancellationToken) { using (await SemaphoreSlimContext.Lock(cacheReadSemaphore, cancellationToken)) { + forceFresh ??= false; if (cacheForceGenerated) forceFresh = false; else - cacheForceGenerated |= forceFresh; + cacheForceGenerated |= forceFresh.Value; ArgumentNullException.ThrowIfNull(administrationAuthority); var response = await administrationAuthority.Invoke( - authority => authority.GetUpdateInformation(forceFresh, cancellationToken)); + authority => authority.GetUpdateInformation(forceFresh.Value, cancellationToken)); return response; }