Skip to content

Commit 5a2466a

Browse files
authored
Fix stream closed before response during batch stream creation (#3214)
1 parent bb081be commit 5a2466a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/brpc/controller.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,6 +1448,7 @@ void Controller::HandleStreamConnection(Socket *host_socket) {
14481448
auto extra_stream_ids = std::move(*_remote_stream_settings->mutable_extra_stream_ids());
14491449
_remote_stream_settings->clear_extra_stream_ids();
14501450
for (size_t i = 1; i < stream_num; ++i) {
1451+
if(!ptrs[i]) continue;
14511452
Stream* extra_stream = (Stream *) ptrs[i]->conn();
14521453
_remote_stream_settings->set_stream_id(extra_stream_ids[i - 1]);
14531454
s->SetHostSocket(host_socket);

0 commit comments

Comments
 (0)