This is an automated email from the ASF dual-hosted git repository.

wwbmmm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new 5a2466a9 Fix stream closed before response during batch stream 
creation (#3214)
5a2466a9 is described below

commit 5a2466a904f2d507868e198ef6ca701fb8ab7629
Author: Jenrry You <[email protected]>
AuthorDate: Sun Feb 15 20:57:38 2026 +0800

    Fix stream closed before response during batch stream creation (#3214)
---
 src/brpc/controller.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/brpc/controller.cpp b/src/brpc/controller.cpp
index d7b511db..d3821eca 100644
--- a/src/brpc/controller.cpp
+++ b/src/brpc/controller.cpp
@@ -1448,6 +1448,7 @@ void Controller::HandleStreamConnection(Socket 
*host_socket) {
         auto extra_stream_ids = 
std::move(*_remote_stream_settings->mutable_extra_stream_ids());
         _remote_stream_settings->clear_extra_stream_ids();
         for (size_t i = 1; i < stream_num; ++i) {
+            if(!ptrs[i]) continue;
             Stream* extra_stream = (Stream *) ptrs[i]->conn();
             _remote_stream_settings->set_stream_id(extra_stream_ids[i - 1]);
             s->SetHostSocket(host_socket);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to