| 262 | } |
| 263 | |
| 264 | inline std::pair<bool, uint8_t> |
| 265 | HostDBInfo::increment_fail_count(ts_time now, uint8_t max_retries) |
| 266 | { |
| 267 | auto fcount = ++fail_count; |
| 268 | bool marked_down = false; |
| 269 | if (fcount >= max_retries) { |
| 270 | marked_down = mark_down(now); |
| 271 | } |
| 272 | return std::make_pair(marked_down, fcount); |
| 273 | } |
| 274 | |
| 275 | inline bool |
| 276 | HostDBInfo::select(ts_time now, ts_seconds fail_window) const |