Skip to content

Commit

Permalink
fix dumb error on enrichmetn data expiration
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal-Delange committed Jun 13, 2024
1 parent 81b16da commit a7990fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions repositories/transfercheck_enrichment.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (r *TransferCheckEnrichmentRepository) setupIpCountryRanges(ctx context.Con
defer span.End()
r.muCountries.Lock()
defer r.muCountries.Unlock()
if time.Now().After(r.countryRangesExpireAt) {
if time.Now().Before(r.countryRangesExpireAt) {
return nil
}

Expand Down Expand Up @@ -187,7 +187,7 @@ func (r *TransferCheckEnrichmentRepository) setupIpTypeRanges(ctx context.Contex
defer span.End()
r.muIpTypes.Lock()
defer r.muIpTypes.Unlock()
if time.Now().After(r.ipTypeRangesExpireAt) {
if time.Now().Before(r.ipTypeRangesExpireAt) {
return nil
}

Expand Down

0 comments on commit a7990fb

Please sign in to comment.