chenBright commented on code in PR #2093:
URL: https://github.com/apache/brpc/pull/2093#discussion_r1267778828


##########
src/brpc/controller.cpp:
##########
@@ -1017,7 +1032,17 @@ void Controller::IssueRPC(int64_t start_realtime_us) {
     _current_call.need_feedback = false;
     _current_call.enable_circuit_breaker = has_enabled_circuit_breaker();
     SocketUniquePtr tmp_sock;
-    if (SingleServer()) {
+    if ((_connection_type & CONNECTION_TYPE_POOLED_AND_SHORT) && 
+        _bind_sock_action == BIND_SOCK_USE) {
+        tmp_sock.reset(_bind_sock.release());
+        if (!tmp_sock || (!is_health_check_call() && 
!tmp_sock->IsAvailable())) {
+            SetFailed(EHOSTDOWN, "Not connected to bind socket yet, 
server_id=%" PRIu64,
+                      tmp_sock->id());

Review Comment:
   tmp_sock为NULL,tmp_sock->id()会coredump吧?



##########
src/brpc/controller.cpp:
##########
@@ -1017,7 +1032,17 @@ void Controller::IssueRPC(int64_t start_realtime_us) {
     _current_call.need_feedback = false;
     _current_call.enable_circuit_breaker = has_enabled_circuit_breaker();
     SocketUniquePtr tmp_sock;
-    if (SingleServer()) {
+    if ((_connection_type & CONNECTION_TYPE_POOLED_AND_SHORT) && 
+        _bind_sock_action == BIND_SOCK_USE) {
+        tmp_sock.reset(_bind_sock.release());
+        if (!tmp_sock || (!is_health_check_call() && 
!tmp_sock->IsAvailable())) {
+            SetFailed(EHOSTDOWN, "Not connected to bind socket yet, 
server_id=%" PRIu64,
+                      tmp_sock->id());

Review Comment:
   tmp_sock为NULL,tmp_sock->id()会coredump吧?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to