Skip to content

Commit

Permalink
fix: Fix the problem that ip cache time is one less
Browse files Browse the repository at this point in the history
  • Loading branch information
feranwq committed May 25, 2023
1 parent d69bbe6 commit 1dd9936
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/ip_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ func (d *IpCache) Check(newAddr string) bool {
if d.Addr != newAddr || d.Times <= 1 {
IPCacheTimes, err := strconv.Atoi(os.Getenv(IPCacheTimesENV))
if err != nil {
IPCacheTimes = 6
IPCacheTimes = 5
}
d.Addr = newAddr
d.Times = IPCacheTimes
d.Times = IPCacheTimes + 1
return true
}
d.Addr = newAddr
Expand Down

0 comments on commit 1dd9936

Please sign in to comment.