pavel2003 opened a new issue, #2541:
URL: https://github.com/apache/brpc/issues/2541

   **Describe the bug (描述bug)**
   在函数SendRpcResponse会调用SendStreamData发送应答包给客户端,如果此时socket 
overcrowded了,那么这个应答包就发送不到客户端的。客户端接收不到rpc应答包,就会一直卡主,直到超时
   
       if(cntl->has_remote_stream()){
           // Send the response over stream to notify that this stream 
connection
           // is successfully built.
           // Response_stream can be INVALID_STREAM_ID when error occurs.
           if (SendStreamData(sock, &res_buf,
                              accessor.remote_stream_settings()->stream_id(),
                              accessor.response_stream()) != 0) {
               const int errcode = errno;
               PLOG_IF(WARNING, errcode != EPIPE) << "Fail to write into " << 
*sock;
               cntl->SetFailed(errcode, "Fail to write into %s",
                               sock->description().c_str());
               if(stream_ptr) {
                   ((Stream*)stream_ptr->conn())->Close();
               }
               return;
           }
   
   
   这种情况是预期的吗,感觉更好的处理方式应该是返回错误给客户端
   
   SendStreamData是不是最好设置忽略overcrowded
   
   
   
   
   
   
   **To Reproduce (复现方法)**
   
   
   **Expected behavior (期望行为)**
   
   
   **Versions (各种版本)**
   OS:
   Compiler:
   brpc:
   protobuf:
   
   **Additional context/screenshots (更多上下文/截图)**
   
   


-- 
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.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