registerFailureLocked advances the circuit breaker. Callers hold mu.
()
| 257 | |
| 258 | // registerFailureLocked advances the circuit breaker. Callers hold mu. |
| 259 | func (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. |
| 268 | func (s *renderSession) touchLocked() { |