brpc
brpc copied to clipboard
Fix: potential missing on_closed message on client-side
What problem does this PR solve?
Issue Number:
Problem Summary:
We have met a problem in Apache Doris where a stream rpc client cannot receive any message (including on_closed) from stream server.
https://github.com/apache/doris/pull/30476
In certain cases, if the server-side stream is actively closing the stream. The close frame is not sent to client-side due to connected is not set. We should set connected before send stream data.
What is changed and the side effects?
Changed:
Side effects:
-
Performance effects(性能影响):
-
Breaking backward compatibility(向后兼容性):
Check List:
- Please make sure your changes are compilable(请确保你的更改可以通过编译).
- When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
- Please follow Contributor Covenant Code of Conduct.(请遵循贡献者准则).
之前UT有问题。最新master分支已修复,可以更新试试。
StreamingRpcTest.server_send_data_before_run_done 这个单测失败了,是不是和改动有关?