Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ dist
ninja_build_release
_builds
_logs
.build
12 changes: 2 additions & 10 deletions src/protocol/gossip/gossip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -933,19 +933,11 @@ namespace libp2p::protocol::gossip {
}
peer->writing_ = true;
auto peer_id = peer->peer_id_;
coroSpawn(*io_context_, [WEAK_SELF, peer, peer_id, logger = logger_]() -> Coro<void> {
coroSpawn(*io_context_, [peer, peer_id, logger = logger_]() -> Coro<void> {
co_await coroYield();
assert(peer->writing_);
assert(peer->stream_out_.has_value());
while (true) {
auto self = weak_self.lock();
if (not self) {
break;
}
auto message = qtils::optionTake(peer->batch_);
if (not message) {
break;
}
while (auto message = qtils::optionTake(peer->batch_)) {
auto pb_messages = splitBatch(*message);
SL_TRACE(logger, "CHECKWRITE sending {} PB messages to {}", pb_messages.size(), peer_id.toBase58());

Expand Down