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:
   加了,我们在单机测试下,出现了客户端收不到 on_closed 的问题:
   1. 服务端 send response 先发了包,但还未设置 connected。
   2. 客户端收到 open 成功,处理完后续逻辑,执行 stream close。
   3. 服务端收到 on_closed 时候,set 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-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