Skip to content

Commit

Permalink
possible bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
devhl-labs committed Apr 5, 2024
1 parent 2f8d5c8 commit 3c82fe9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/CocApi.Cache/CocApi.Cache.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Authors>devhl</Authors>
<Product />
<Description>Caches response from the Clash of Clans API.</Description>
<Version>2.11.6-debug.5</Version>
<Version>2.11.6-debug.6</Version>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.0.0.0</FileVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down
5 changes: 2 additions & 3 deletions src/CocApi.Cache/Services/ClanService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,8 @@ private void ExtendWarTTLWhileInCwl(CachedClan cachedClan)
cachedClan.CurrentWar.Content?.State == Rest.Models.WarState.Preparation ||
cachedClan.Group.Content == null ||
cachedClan.Group.Content.State == Rest.Models.GroupState.Ended ||
cachedClan.Group.Content.Season.Month < DateTime.UtcNow.Month ||
(cachedClan.Group.KeepUntil.HasValue && cachedClan.Group.KeepUntil.Value.Month > DateTime.UtcNow.Month) ||
cachedClan.Group.DownloadedAt < DateTime.UtcNow.AddDays(-7))
(cachedClan.Group.Content.Season.Month < DateTime.UtcNow.Month || cachedClan.Group.Content.Season.Year < DateTime.UtcNow.Year) ||
(cachedClan.Group.KeepUntil.HasValue && cachedClan.Group.KeepUntil.Value.Month > DateTime.UtcNow.Month))
return;

// keep currentwar around an arbitrary amount of time since we are in cwl
Expand Down

0 comments on commit 3c82fe9

Please sign in to comment.