| 241 | } |
| 242 | |
| 243 | unsigned |
| 244 | max_retries(ParentRetry_t method) const |
| 245 | { |
| 246 | // There's no API for specifying the retries, so you get 0. |
| 247 | if (is_api_result()) { |
| 248 | return 0; |
| 249 | } |
| 250 | |
| 251 | switch (method) { |
| 252 | case PARENT_RETRY_NONE: |
| 253 | return 0; |
| 254 | case PARENT_RETRY_SIMPLE: |
| 255 | return rec->max_simple_retries; |
| 256 | case PARENT_RETRY_UNAVAILABLE_SERVER: |
| 257 | return rec->max_unavailable_server_retries; |
| 258 | case PARENT_RETRY_BOTH: |
| 259 | return std::max(rec->max_unavailable_server_retries, rec->max_simple_retries); |
| 260 | } |
| 261 | |
| 262 | return 0; |
| 263 | } |
| 264 | |
| 265 | bool |
| 266 | response_is_retryable(ParentRetry_t retry_type, HTTPStatus response_code) const |
no test coverage detected