Skip to content

Commit 0ad1b44

Browse files
Update cpp/src/streaming/core/fanout.cpp
Co-authored-by: Lawrence Mitchell <[email protected]>
1 parent 9e213db commit 0ad1b44

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cpp/src/streaming/core/fanout.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ Node bounded_fanout(
9090
break;
9191
}
9292

93+
std::erase_if(chs_out, [](auto&& ch) { return ch->is_shutdown(); });
94+
if (chs_out.empty()) {
95+
break;
96+
}
9397
co_await send_to_channels(ctx.get(), std::move(msg), chs_out);
9498
logger.trace("Sent message ", msg.sequence_number());
9599
}

0 commit comments

Comments
 (0)