(ip string, record *IPRecord)
| 148 | } |
| 149 | |
| 150 | func (t *IPTracker) prepareRecordUnsafe(ip string, record *IPRecord) bool { |
| 151 | if time.Since(record.LastUpdate) > ExpireDuration { |
| 152 | return false |
| 153 | } |
| 154 | if !record.LockedUntil.IsZero() && !time.Now().Before(record.LockedUntil) { |
| 155 | record.FailedCount = 0 |
| 156 | record.LockedUntil = time.Time{} |
| 157 | record.LastUpdate = time.Now() |
| 158 | } |
| 159 | return true |
| 160 | } |
no outgoing calls
no test coverage detected