From 2f5651cd1a1efb136179cdbcb3b29ed0cc11ca2a Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 10 Jun 2024 13:40:32 +0800 Subject: HALF WORK: still need to fix invalid size value in Buffer. NEED TEST: BufferStream, AutoReadStream, SubProcess. --- src/common/io/BufferStream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/io/BufferStream.cpp') diff --git a/src/common/io/BufferStream.cpp b/src/common/io/BufferStream.cpp index b2467a17..3060a608 100644 --- a/src/common/io/BufferStream.cpp +++ b/src/common/io/BufferStream.cpp @@ -67,7 +67,7 @@ Index BufferStream::Write(const std::byte* buffer, Index offset, Index size) { } condition_variable_.wait(lock, [this] { - return buffer_list_.size() < max_block_count_ || + return max_block_count_ <= 0 || buffer_list_.size() < max_block_count_ || buffer_list_.back().GetBackFree() > 0; }); -- cgit v1.2.3