Skip to content

Commit 2a4c30a

Browse files
committed
quic: Clear waited_next in NonIdempotentDataQueueReader
1 parent 64d1a36 commit 2a4c30a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/dataqueue/queue.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,13 @@ class NonIdempotentDataQueueReader final
434434
CHECK(!data_queue_->is_idempotent());
435435
}
436436

437-
~NonIdempotentDataQueueReader() { data_queue_->reader_destructed(this); }
437+
~NonIdempotentDataQueueReader() {
438+
if (waited_next_) {
439+
std::move(waited_next_)(
440+
bob::Status::STATUS_EOS, nullptr, 0, [](uint64_t) {});
441+
}
442+
data_queue_->reader_destructed(this);
443+
}
438444

439445
// Disallow moving and copying.
440446
NonIdempotentDataQueueReader(const NonIdempotentDataQueueReader&) = delete;

0 commit comments

Comments
 (0)