Skip to content

Commit

Permalink
Add forgotten error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mreiger committed Aug 30, 2024
1 parent a814da6 commit 4c406fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/dns/dnscache.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ func (c *DNSCache) restoreSets(fqdnSets []firewallv1.IPSet) {
ipa, _, _ := strings.Cut(ip, ",")
expirationTime := time.Now()
if _, ets, found := strings.Cut(ip, ": "); found {
expirationTime.UnmarshalText([]byte(ets))
if err := expirationTime.UnmarshalText([]byte(ets)); err != nil {
expirationTime = time.Now()
}
}
ipe.ips[ipa] = expirationTime
}
Expand Down

0 comments on commit 4c406fd

Please sign in to comment.