You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "kaijchen (via GitHub)" <gi...@apache.org> on 2024/02/04 04:44:38 UTC

Re: [PR] Fix: set connected before send stream data (brpc)

kaijchen commented on code in PR #2525:
URL: https://github.com/apache/brpc/pull/2525#discussion_r1477177349


##########
src/brpc/policy/baidu_rpc_protocol.cpp:
##########
@@ -247,6 +247,11 @@ void SendRpcResponse(int64_t correlation_id,
     // Send rpc response over stream even if server side failed to create
     // stream for some reason.
     if(cntl->has_remote_stream()){
+        if (stream_ptr) {

Review Comment:
   加了,我们的场景是服务端收到一个 EOS 消息后主动关闭 stream。
   在单机测试下,出现了客户端收不到 on_closed 的问题。
   这里 response 先发了包,但还未设置 connected,导致 close frame 没发出去
   
   ![img_v3_027h_ef451b0b-127e-421e-aa49-7a069148d34g](https://github.com/apache/brpc/assets/5821159/6d5e889b-4b01-4c95-918c-c28b40daf9c0)
   



-- 
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-unsubscribe@brpc.apache.org

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


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