| 276 | } |
| 277 | |
| 278 | bool |
| 279 | NextHopSelectionStrategy::nextHopExists(TSHttpTxn txnp, void * /* ih ATS_UNUSED */) |
| 280 | { |
| 281 | HttpSM *sm = reinterpret_cast<HttpSM *>(txnp); |
| 282 | int64_t sm_id = sm->sm_id; |
| 283 | |
| 284 | for (uint32_t gg = 0; gg < groups; gg++) { |
| 285 | for (auto &hh : host_groups[gg]) { |
| 286 | HostRecord *p = hh.get(); |
| 287 | if (p->available.load()) { |
| 288 | NH_Dbg(NH_DBG_CTL, |
| 289 | "[%" PRIu64 "] found available next hop %s (this is NOT necessarily the parent which will be selected, just the " |
| 290 | "first available parent found)", |
| 291 | sm_id, p->hostname.c_str()); |
| 292 | return true; |
| 293 | } |
| 294 | } |
| 295 | } |
| 296 | return false; |
| 297 | } |
| 298 | |
| 299 | ParentRetry_t |
| 300 | NextHopSelectionStrategy::responseIsRetryable(int64_t sm_id, HttpTransact::CurrentInfo ¤t_info, HTTPStatus response_code) |
no test coverage detected