MCPcopy Create free account
hub / github.com/apache/brpc / does_error_affect_main_socket

Function does_error_affect_main_socket

src/brpc/controller.cpp:775–783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

773}
774
775inline 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

Callers 1

OnCompleteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected