cancel will interrupt the currently active backoff.
()
| 80 | |
| 81 | // cancel will interrupt the currently active backoff. |
| 82 | func (s *ServerStatistics) cancel() { |
| 83 | s.blacklisted.Store(false) |
| 84 | s.backoffUntil.Store(time.Time{}) |
| 85 | select { |
| 86 | case s.interrupt <- struct{}{}: |
| 87 | default: |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | // Success updates the server statistics with a new successful |
| 92 | // attempt, which increases the sent counter and resets the idle and |
no outgoing calls