Skip to content

Commit

Permalink
feat: Set immediate expiry when we are unable to retrieve a valid sta…
Browse files Browse the repository at this point in the history
…tus.

This prevents using stale DOWN status for an entire 30 mins.
  • Loading branch information
Tuxdude committed Jul 13, 2024
1 parent 6b58a26 commit 5779d66
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ func (f *cableModemStatusFetcher) Fetch(in FetcherInput) (FetcherOutput, time.Ti
st: st,
err: err,
}

if err != nil {
return res, start
}
return res, start.Add(cacheExpiry)
}

Expand Down

0 comments on commit 5779d66

Please sign in to comment.