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 8645628 commit 2f8d5c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 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.4</Version>
<Version>2.11.6-debug.5</Version>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.0.0.0</FileVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down
3 changes: 2 additions & 1 deletion src/CocApi.Cache/Services/ClanService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ private void ExtendWarTTLWhileInCwl(CachedClan cachedClan)
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.KeepUntil.HasValue && cachedClan.Group.KeepUntil.Value.Month > DateTime.UtcNow.Month) ||
cachedClan.Group.DownloadedAt < DateTime.UtcNow.AddDays(-7))
return;

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

0 comments on commit 2f8d5c8

Please sign in to comment.