MCPcopy Create free account
hub / github.com/diillson/chatcli / registerFailureLocked

Method registerFailureLocked

cli/plugins/webfetch_render.go:259–265  ·  view source on GitHub ↗

registerFailureLocked advances the circuit breaker. Callers hold mu.

()

Source from the content-addressed store, hash-verified

257
258// registerFailureLocked advances the circuit breaker. Callers hold mu.
259func (s *renderSession) registerFailureLocked() {
260 s.consecutiveFailures++
261 if s.consecutiveFailures >= renderFailureThreshold {
262 s.cooldownUntil = time.Now().Add(renderCooldown)
263 s.consecutiveFailures = 0
264 }
265}
266
267// touchLocked (re)arms the idle shutdown timer. Callers hold mu.
268func (s *renderSession) touchLocked() {

Callers 2

acquireMethod · 0.95

Calls 1

AddMethod · 0.80