| 773 | } |
| 774 | |
| 775 | inline bool does_error_affect_main_socket(int error_code) { |
| 776 | // Errors tested in this function are reported by pooled connections |
| 777 | // and very likely to indicate that the server-side is down and the socket |
| 778 | // should be health-checked. |
| 779 | return error_code == ECONNREFUSED || |
| 780 | error_code == ENETUNREACH || |
| 781 | error_code == EHOSTUNREACH || |
| 782 | error_code == EINVAL/*returned by connect "0.0.0.1"*/; |
| 783 | } |
| 784 | |
| 785 | //Note: A RPC call is probably consisted by several individual Calls such as |
| 786 | // retries and backup requests. This method simply cares about the error of |