| 644 | } |
| 645 | |
| 646 | int Channel::CheckHealth() { |
| 647 | if (_lb == NULL) { |
| 648 | SocketUniquePtr ptr; |
| 649 | if (Socket::Address(_server_id, &ptr) == 0 && ptr->IsAvailable()) { |
| 650 | return 0; |
| 651 | } |
| 652 | return -1; |
| 653 | } else { |
| 654 | SocketUniquePtr tmp_sock; |
| 655 | LoadBalancer::SelectIn sel_in = { 0, false, true, 0, NULL }; |
| 656 | LoadBalancer::SelectOut sel_out(&tmp_sock); |
| 657 | return _lb->SelectServer(sel_in, &sel_out); |
| 658 | } |
| 659 | } |
| 660 | |
| 661 | } // namespace brpc |
nothing calls this directly
no test coverage detected