| 514 | } |
| 515 | |
| 516 | bool |
| 517 | HttpTransact::is_server_negative_cached(State *s) |
| 518 | { |
| 519 | if (s->dns_info.active && s->dns_info.active->last_fail_time() != TS_TIME_ZERO && |
| 520 | s->dns_info.active->last_fail_time() + s->txn_conf->down_server_timeout > ts_clock::from_time_t(s->client_request_time)) { |
| 521 | return true; |
| 522 | } else { |
| 523 | // Make sure some nasty clock skew has not happened |
| 524 | // Use the server timeout to set an upperbound as to how far in the |
| 525 | // future we should tolerate bogus last failure times. This sets |
| 526 | // the upper bound to the time that we would ever consider a server |
| 527 | // down to 2*down_server_timeout |
| 528 | if (s->dns_info.active && |
| 529 | ts_clock::from_time_t(s->client_request_time) + s->txn_conf->down_server_timeout < s->dns_info.active->last_fail_time()) { |
| 530 | s->dns_info.active->mark_up(); |
| 531 | ink_assert(!"extreme clock skew"); |
| 532 | return true; |
| 533 | } |
| 534 | return false; |
| 535 | } |
| 536 | } |
| 537 | |
| 538 | inline static void |
| 539 | update_current_info(HttpTransact::CurrentInfo *into, HttpTransact::ConnectionAttributes *from, |
nothing calls this directly
no test coverage detected